Skip to content

Commit c9d62f0

Browse files
committed
FIXES
1 parent 2a5f8f8 commit c9d62f0

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/pages/Scanner.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@ const QRScanner = () => {
2424
</div>
2525
<QrReader
2626
scanDelay={100}
27-
28-
enableCamera={true}
29-
30-
facingMode={"environment"}
31-
delay={500}
27+
constraints={{facingMode: "environment" }}
3228
onError={(err) => console.log(err)}
33-
onScan={(data) => console.log(data)}
29+
onScan={(data) => window.alert("Scan Successful")}
3430
// chooseDeviceId={()=>selected}
3531
containerStyle={{ width: "100%", heigth: "200px" }}
3632
videoContainerStyle={{ width: "100%", heigth: "200px", border: "1px solid red" }}
@@ -42,7 +38,7 @@ const QRScanner = () => {
4238
}
4339

4440
if (!!error) {
45-
console.info("failed",error);
41+
console.info("failed");
4642
}
4743
}}
4844
/>

0 commit comments

Comments
 (0)