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 25, 2024
1 parent c160e7b commit 8804e58
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 8804e58

Please sign in to comment.