Skip to content

Commit

Permalink
fix(scanner): scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
opensrc0 committed May 18, 2024
1 parent 25ef2b4 commit dc2b77c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions __app/component/Scanner/Scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function Scanner({
const failureMsg = { ...failureMsgDefault, ...failureMsgProps };

const [flash, setFlash] = useState(false);
const [isBrowser, setIsBrowser] = useState(false);

const stopStreaming = () => {
if (mediaStream) {
Expand Down Expand Up @@ -164,15 +163,14 @@ function Scanner({
};

useEffect(() => {
setIsBrowser(true);
handleBrowserSupport();

return () => {
allClear();
};
}, []);

return isBrowser && isBrowserSupport() && (
return isBrowserSupport() && (
<div id="scanner">
<div id="camera" />
{
Expand Down

0 comments on commit dc2b77c

Please sign in to comment.