diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-06-30 15:18:57 -0400 |
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-06-30 15:18:57 -0400 |
| commit | c548f8df62c3775058ffa18e201ca230a641e6c1 (patch) | |
| tree | 19e1f72cbc6f46f9ad98d2800e6f6d36a8c4dd43 /src/screens | |
| parent | d22e3508a4122575c064bbcb2df94a6e07bce7eb (diff) | |
Cleanup code
Diffstat (limited to 'src/screens')
| -rw-r--r-- | src/screens/moments/CameraScreen.tsx | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/screens/moments/CameraScreen.tsx b/src/screens/moments/CameraScreen.tsx index 1826f9d7..b3275764 100644 --- a/src/screens/moments/CameraScreen.tsx +++ b/src/screens/moments/CameraScreen.tsx @@ -15,7 +15,7 @@ import { } from '../../components'; import {MainStackParams} from '../../routes'; import {HeaderHeight, normalize, SCREEN_WIDTH} from '../../utils'; -import {takePicture} from '../../utils/camera'; +import {navigateToImagePicker, takePicture} from '../../utils/camera'; type CameraScreenRouteProps = RouteProp<MainStackParams, 'CameraScreen'>; export type CameraScreenNavigationProps = StackNavigationProp< @@ -52,6 +52,7 @@ const CameraScreen: React.FC<CameraScreenProps> = ({route, navigation}) => { ); }, [capturedImage]); + console.log(capturedImage); /* * Appears once a picture has been captured to navigate to the caption screen */ @@ -123,8 +124,21 @@ const CameraScreen: React.FC<CameraScreenProps> = ({route, navigation}) => { ) : ( <GalleryIcon mostRecentPhotoUri={mostRecentPhoto} - screenType={screenType} - title={title} + callback={() => + navigateToImagePicker((pic) => { + if (pic.filename) { + navigation.navigate('ZoomInCropper', { + screenType, + title, + media: { + filename: pic.filename, + uri: pic.path, + isVideo: false, + }, + }); + } + }) + } /> )} </View> |
