diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-07-02 19:26:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-02 19:26:28 -0400 |
| commit | f88193340ef5110080732d37c6a6ab69013f7b36 (patch) | |
| tree | 3de0e277727ef27f23386043c26f1d3f46ba064c /src/components/moments/Moment.tsx | |
| parent | cef9d8e9908936a10a9aa0069e364ebf5970da4c (diff) | |
| parent | c772d0491529b795cc2cb3d87f6dd2ecd1775116 (diff) | |
Merge pull request #489 from IvanIFChen/tma953-camera-screen-video
[TMA-953] Camera Screen Video
Diffstat (limited to 'src/components/moments/Moment.tsx')
| -rw-r--r-- | src/components/moments/Moment.tsx | 45 |
1 files changed, 1 insertions, 44 deletions
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} |
