diff options
author | Ivan Chen <ivan@tagg.id> | 2021-07-01 17:32:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-01 17:32:12 -0400 |
commit | fa9c527f85d23a38b45c7efc41ec4590597fa7a1 (patch) | |
tree | 164852b257ab961fb8d4a067189b85e0aadcc180 /src/components/camera/GalleryIcon.tsx | |
parent | 66c974161b59f1e3570e2a4a42334fabc16c2129 (diff) | |
parent | ad2f052c6d2cd1b50cc01200597b5b79cb33082d (diff) |
Merge pull request #472 from TaggiD-Inc/poc-video
[POC] PoC Video
Diffstat (limited to 'src/components/camera/GalleryIcon.tsx')
-rw-r--r-- | src/components/camera/GalleryIcon.tsx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/components/camera/GalleryIcon.tsx b/src/components/camera/GalleryIcon.tsx index c49ace7d..8d396550 100644 --- a/src/components/camera/GalleryIcon.tsx +++ b/src/components/camera/GalleryIcon.tsx @@ -1,14 +1,12 @@ -import {useNavigation} from '@react-navigation/native'; import React from 'react'; import {Image, Text, TouchableOpacity, View} from 'react-native'; -import {ScreenType} from '../../types'; import {navigateToImagePicker} from '../../utils/camera'; +import {Image as ImageType} from 'react-native-image-crop-picker'; import {styles} from './styles'; interface GalleryIconProps { - screenType: ScreenType; - title: string; mostRecentPhotoUri: string; + callback: (pic: ImageType) => void; } /* @@ -16,14 +14,12 @@ interface GalleryIconProps { * On click, navigates to the image picker */ export const GalleryIcon: React.FC<GalleryIconProps> = ({ - screenType, - title, mostRecentPhotoUri, + callback, }) => { - const navigation = useNavigation(); return ( <TouchableOpacity - onPress={() => navigateToImagePicker(navigation, screenType, title)} + onPress={() => navigateToImagePicker(callback)} style={styles.saveButton}> {mostRecentPhotoUri !== '' ? ( <Image |