From 56733c854c818b143edf03327bca679e10317202 Mon Sep 17 00:00:00 2001 From: Loewy Date: Fri, 2 Feb 2024 18:52:19 -0800 Subject: [PATCH] add record entry screen/modal and required nav flow --- component/video/camera.tsx | 25 +++++- navigation/tab-navigator.tsx | 24 +++++- package.json | 1 + react-native-vision-camera | 2 +- screens/video-stack/record.tsx | 145 +++++++++++++++++++++++++++++++++ screens/video-stack/styles.ts | 57 +++++++++++++ yarn.lock | 5 ++ 7 files changed, 254 insertions(+), 5 deletions(-) create mode 100644 screens/video-stack/record.tsx create mode 100644 screens/video-stack/styles.ts diff --git a/component/video/camera.tsx b/component/video/camera.tsx index 5248b66..9c86995 100644 --- a/component/video/camera.tsx +++ b/component/video/camera.tsx @@ -15,7 +15,15 @@ import { RecordingButton } from "./capture-button"; import { useIsForeground } from "./is-foreground"; import { useIsFocused } from "@react-navigation/native"; -export default function CameraScreen(): React.ReactElement { +export default function CameraScreen({ route, navigation }): React.ReactElement { + // TODO: #73 Does this need to be passed to Camera component? + // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars + const { gameType, tableSize, tags, location } = route.params + // LOG for params -- Remove when no longer needed + // Note: camelCased value being passed, change on record.tsx if you want a different value format + console.log(gameType, tableSize, tags, location) + + const camera = useRef(null); const { hasPermission, requestPermission } = useCameraPermission(); const [isCameraInitialized, setIsCameraInitialized] = @@ -63,6 +71,7 @@ export default function CameraScreen(): React.ReactElement { ); }; + // Replace with error handling if (device === null) { console.log(device); return ( @@ -86,6 +95,9 @@ export default function CameraScreen(): React.ReactElement { orientation={orientation} // TODO: #60 isActive={isActive} /> + +