Skip to content

Commit

Permalink
[feat] round camera viewport, hide case preview after joining case, h…
Browse files Browse the repository at this point in the history
…ide view case option after navigating to a different screen.
  • Loading branch information
ronniebeggs committed Apr 25, 2024
1 parent a7d3e49 commit b35c441
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default function AddCase() {

const addToCases = async (newCase: Case) => {
await joinCase(newCase);
router.back();
router.replace('/AllCases');
};

Expand Down
2 changes: 2 additions & 0 deletions src/app/(BottomTabNavigation)/QRCodeScanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ function QRCodeScannerScreen() {
useEffect(() => {
navigation.addListener('blur', async () => {
resetScanner();
setScannedCase(undefined);
});
navigation.addListener('focus', async () => {
resetScanner();
setScannedCase(undefined);
setTimeout(() => {}, 1000);
});
}, [navigation]);
Expand Down
5 changes: 3 additions & 2 deletions src/app/(BottomTabNavigation)/QRCodeScanner/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ export default StyleSheet.create({
height: 300,
width: 300,
border: 'solid',
borderWidth: 3,
borderRadius: 5,
borderWidth: 5,
borderRadius: 10,
marginVertical: 20,
overflow: 'hidden',
},
validScan: {
borderColor: colors.green,
Expand Down

0 comments on commit b35c441

Please sign in to comment.