We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a5f8f8 commit c9d62f0Copy full SHA for c9d62f0
src/pages/Scanner.js
@@ -24,13 +24,9 @@ const QRScanner = () => {
24
</div>
25
<QrReader
26
scanDelay={100}
27
-
28
- enableCamera={true}
29
30
- facingMode={"environment"}
31
- delay={500}
+ constraints={{facingMode: "environment" }}
32
onError={(err) => console.log(err)}
33
- onScan={(data) => console.log(data)}
+ onScan={(data) => window.alert("Scan Successful")}
34
// chooseDeviceId={()=>selected}
35
containerStyle={{ width: "100%", heigth: "200px" }}
36
videoContainerStyle={{ width: "100%", heigth: "200px", border: "1px solid red" }}
@@ -42,7 +38,7 @@ const QRScanner = () => {
42
38
}
43
39
44
40
if (!!error) {
45
- console.info("failed",error);
41
+ console.info("failed");
46
47
}}
48
/>
0 commit comments