Skip to content

Commit

Permalink
Updated to hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh-D-2004 committed Mar 4, 2025
1 parent cfb3b28 commit 10e3214
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Utils/cameraPermissionHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const handleCameraPermission = () => {
const requestPermission = useCallback(
async (device: "camera", cameraFacingMode: string = "user") => {
try {
setToastShown(false);
setToastShown(false);
const constraints =
device === "camera"
? { video: { facingMode: cameraFacingMode } }
Expand All @@ -20,7 +20,7 @@ export const handleCameraPermission = () => {
setToastShown(true);
toast.warning(`${device} permission denied`);
}
return false; // Permission denied
return false;
}
},
[toastShown],
Expand Down

0 comments on commit 10e3214

Please sign in to comment.