diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/camera/GalleryIcon.tsx | 4 | ||||
-rw-r--r-- | src/components/moments/Moment.tsx | 45 |
2 files changed, 3 insertions, 46 deletions
diff --git a/src/components/camera/GalleryIcon.tsx b/src/components/camera/GalleryIcon.tsx index 8d396550..ca2d2559 100644 --- a/src/components/camera/GalleryIcon.tsx +++ b/src/components/camera/GalleryIcon.tsx @@ -1,12 +1,12 @@ import React from 'react'; import {Image, Text, TouchableOpacity, View} from 'react-native'; import {navigateToImagePicker} from '../../utils/camera'; -import {Image as ImageType} from 'react-native-image-crop-picker'; +import {ImageOrVideo} from 'react-native-image-crop-picker'; import {styles} from './styles'; interface GalleryIconProps { mostRecentPhotoUri: string; - callback: (pic: ImageType) => void; + callback: (media: ImageOrVideo) => void; } /* diff --git a/src/components/moments/Moment.tsx b/src/components/moments/Moment.tsx index 1e1cadce..73503c5e 100644 --- a/src/components/moments/Moment.tsx +++ b/src/components/moments/Moment.tsx @@ -1,6 +1,6 @@ import {useNavigation} from '@react-navigation/native'; import React from 'react'; -import {Alert, StyleProp, StyleSheet, View, ViewStyle} from 'react-native'; +import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native'; import {Text} from 'react-native-animatable'; import {ScrollView, TouchableOpacity} from 'react-native-gesture-handler'; import LinearGradient from 'react-native-linear-gradient'; @@ -12,8 +12,6 @@ import UpIcon from '../../assets/icons/up_icon.svg'; import {TAGG_LIGHT_BLUE} from '../../constants'; import {MomentType, ScreenType} from '../../types'; import {normalize, SCREEN_WIDTH} from '../../utils'; -import {navigateToVideoPicker} from '../../utils/camera'; -import ImagePicker from 'react-native-image-crop-picker'; import MomentTile from './MomentTile'; interface MomentProps { @@ -43,17 +41,6 @@ const Moment: React.FC<MomentProps> = ({ }) => { const navigation = useNavigation(); - const navigateToCaptionScreenForVideo = (uri: string) => { - navigation.navigate('CaptionScreen', { - screenType, - title, - media: { - uri, - isVideo: true, - }, - }); - }; - const navigateToCameraScreen = () => { navigation.navigate('CameraScreen', { title, @@ -97,36 +84,6 @@ const Moment: React.FC<MomentProps> = ({ <PlusIcon width={23} height={23} - onPress={() => - Alert.alert('Video Upload', 'pick one', [ - { - text: 'gallery', - onPress: () => - navigateToVideoPicker((vid) => - navigateToCaptionScreenForVideo(vid.path), - ), - }, - { - text: 'camera (simulator will not work)', - onPress: () => - ImagePicker.openCamera({ - mediaType: 'video', - }) - .then((vid) => { - if (vid.path) { - navigateToCaptionScreenForVideo(vid.path); - } - }) - .catch((err) => console.error(err)), - }, - ]) - } - color={'black'} - style={styles.horizontalMargin} - /> - <PlusIcon - width={23} - height={23} onPress={navigateToCameraScreen} color={TAGG_LIGHT_BLUE} style={styles.horizontalMargin} |