Skip to content

Commit

Permalink
fix: loading state for qr scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
reneaaron committed Sep 24, 2024
1 parent 31e59f9 commit 7bde9cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/QRCodeScanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ function QRCodeScanner({ onScanned, startScanning = true }: QRCodeScannerProps)
};

return (
<>
{isLoading || !isScanning && (
<View className="flex-1">
{(isLoading || (!isScanning && permissionStatus === PermissionStatus.UNDETERMINED)) && (
<View className="flex-1 justify-center items-center">
<Loading />
<Loading className="text-primary-foreground" />
</View>
)}
{!isLoading && <>
Expand All @@ -66,7 +66,7 @@ function QRCodeScanner({ onScanned, startScanning = true }: QRCodeScannerProps)
)}
</>
}
</>
</View>
);
}

Expand Down

0 comments on commit 7bde9cd

Please sign in to comment.