Skip to content

Commit

Permalink
feat: disable qr scanner if there is no BarcodeDetector in window
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Jul 29, 2019
1 parent c2ec962 commit 04f9c99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Welcomes/1b1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default function Welcome({ back, restore }: Props) {
aria-label="icon tabs example">
{/* // TODO: i18n */}
<Tab icon={<FolderOpen />} aria-label="select backup file" />
<Tab icon={<Camera />} aria-label="scan QR code" />
<Tab disabled={!('BarcodeDetector' in window)} icon={<Camera />} aria-label="scan QR code" />
<Tab icon={<Text />} aria-label="paste the JSON by yourself" />
</Tabs>
<main className={classes.main}>
Expand Down

0 comments on commit 04f9c99

Please sign in to comment.