From 8804e5822a10ff739065f8102c1a311118f675e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Tue, 24 Sep 2024 23:20:31 +0200 Subject: [PATCH] fix: loading state for qr scanner --- components/QRCodeScanner.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/QRCodeScanner.tsx b/components/QRCodeScanner.tsx index de8ff6a..060a758 100644 --- a/components/QRCodeScanner.tsx +++ b/components/QRCodeScanner.tsx @@ -47,10 +47,10 @@ function QRCodeScanner({ onScanned, startScanning = true }: QRCodeScannerProps) }; return ( - <> - {isLoading || !isScanning && ( + + {(isLoading || (!isScanning && permissionStatus === PermissionStatus.UNDETERMINED)) && ( - + )} {!isLoading && <> @@ -66,7 +66,7 @@ function QRCodeScanner({ onScanned, startScanning = true }: QRCodeScannerProps) )} } - + ); }