diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-01-11 16:11:11 -0500 |
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-01-15 14:19:50 -0500 |
| commit | 080e76350c2570eeb096fad40fe95f1b766b4539 (patch) | |
| tree | bcb9f73f2c192f8c34f2064a5c3fd003756c2823 /src/components/moments | |
| parent | 1dccfb1d3e9470d81de8d1ec0a0dbb3803372f7d (diff) | |
created strings.ts and linting
Diffstat (limited to 'src/components/moments')
| -rw-r--r-- | src/components/moments/Moment.tsx | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/components/moments/Moment.tsx b/src/components/moments/Moment.tsx index 6dbcd170..56093d65 100644 --- a/src/components/moments/Moment.tsx +++ b/src/components/moments/Moment.tsx @@ -1,27 +1,20 @@ import {useNavigation} from '@react-navigation/native'; import React, {Fragment} from 'react'; -import { - Alert, - StyleProp, - StyleSheet, - View, - ViewProps, - ViewStyle, -} from 'react-native'; +import {Alert, StyleProp, StyleSheet, View, ViewStyle} from 'react-native'; import {Text} from 'react-native-animatable'; import {ScrollView, TouchableOpacity} from 'react-native-gesture-handler'; +import ImagePicker from 'react-native-image-crop-picker'; import LinearGradient from 'react-native-linear-gradient'; -import PlusIcon from '../../assets/icons/plus_icon-01.svg'; -import UpIcon from '../../assets/icons/up_icon.svg'; -import DownIcon from '../../assets/icons/down_icon.svg'; +import {MomentType, ScreenType} from 'src/types'; import DeleteIcon from '../../assets/icons/delete-logo.svg'; +import DownIcon from '../../assets/icons/down_icon.svg'; +import PlusIcon from '../../assets/icons/plus_icon-01.svg'; import BigPlusIcon from '../../assets/icons/plus_icon-02.svg'; +import UpIcon from '../../assets/icons/up_icon.svg'; import {TAGG_TEXT_LIGHT_BLUE} from '../../constants'; +import {ERROR_UPLOAD_MOMENT} from '../../constants/strings'; import {SCREEN_WIDTH} from '../../utils'; -import ImagePicker from 'react-native-image-crop-picker'; import MomentTile from './MomentTile'; -import {MomentType, ScreenType} from 'src/types'; -import {useDispatch} from 'react-redux'; interface MomentProps { title: string; @@ -49,7 +42,6 @@ const Moment: React.FC<MomentProps> = ({ externalStyles, }) => { const navigation = useNavigation(); - const dispatch = useDispatch(); const navigateToImagePicker = () => { ImagePicker.openPicker({ @@ -77,7 +69,7 @@ const Moment: React.FC<MomentProps> = ({ }) .catch((err) => { if (err.code && err.code !== 'E_PICKER_CANCELLED') { - Alert.alert('Unable to upload moment!'); + Alert.alert(ERROR_UPLOAD_MOMENT); } }); }; |
