diff options
| author | Ivan Chen <ivan@thetaggid.com> | 2021-01-15 19:27:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-15 19:27:03 -0500 |
| commit | 1803da7388902db45ad37fbac509604ae632bdb5 (patch) | |
| tree | a786919f9bc42f7797367d55ed8f1e099134f368 /src/components/profile | |
| parent | 4d9efafeb4243e20e1fc936c27b9055c7ec82f8a (diff) | |
| parent | cc52dabaaf529763e9c1c4683ba94ed55c5671a8 (diff) | |
Merge pull request #176 from IvanIFChen/tma498-update-error-strings
[TMA-498] Update Error Strings
Diffstat (limited to 'src/components/profile')
| -rw-r--r-- | src/components/profile/Content.tsx | 2 | ||||
| -rw-r--r-- | src/components/profile/MomentMoreInfoDrawer.tsx | 7 | ||||
| -rw-r--r-- | src/components/profile/ProfilePreview.tsx | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index 1d639a41..50516b55 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -296,7 +296,7 @@ const Content: React.FC<ContentProps> = ({y, userXId, screenType}) => { momentCategories.filter((mc) => mc !== category), false, ), - ); + ) dispatch(deleteUserMomentsForCategory(category)); }, }, diff --git a/src/components/profile/MomentMoreInfoDrawer.tsx b/src/components/profile/MomentMoreInfoDrawer.tsx index e127e05c..77c349ca 100644 --- a/src/components/profile/MomentMoreInfoDrawer.tsx +++ b/src/components/profile/MomentMoreInfoDrawer.tsx @@ -1,6 +1,7 @@ import React from 'react'; import {Alert, StyleSheet, TouchableOpacity, ViewProps} from 'react-native'; import MoreIcon from '../../assets/icons/more_horiz-24px.svg'; +import {ERROR_DELETE_MOMENT, MOMENT_DELETED_MSG} from '../../constants/strings'; import {deleteMoment, sendReport} from '../../services'; import {GenericMoreInfoDrawer} from '../common'; @@ -21,7 +22,7 @@ const MomentMoreInfoDrawer: React.FC<MomentMoreInfoDrawerProps> = (props) => { if (success) { // set time out for UI transitions setTimeout(() => { - Alert.alert('Moment deleted!', '', [ + Alert.alert(MOMENT_DELETED_MSG, '', [ { text: 'OK', onPress: () => dismissScreenAndUpdate(), @@ -31,9 +32,7 @@ const MomentMoreInfoDrawer: React.FC<MomentMoreInfoDrawerProps> = (props) => { }, 500); } else { setTimeout(() => { - Alert.alert( - 'We were unable to delete that moment 😠, please try again later!', - ); + Alert.alert(ERROR_DELETE_MOMENT); }, 500); } }); diff --git a/src/components/profile/ProfilePreview.tsx b/src/components/profile/ProfilePreview.tsx index 134e94cd..23cb2155 100644 --- a/src/components/profile/ProfilePreview.tsx +++ b/src/components/profile/ProfilePreview.tsx @@ -21,6 +21,7 @@ import {logout} from '../../store/actions'; import {fetchUserX, userXInStore} from '../../utils'; import {SearchResultsBackground} from '../search'; import NavigationBar from 'src/routes/tabs'; +import {ERROR_UNABLE_TO_VIEW_PROFILE} from '../../constants/strings'; const NO_USER: UserType = { userId: '', @@ -96,7 +97,7 @@ const ProfilePreview: React.FC<ProfilePreviewProps> = ({ //If the logged in user is blocked by the user being viewed, do not proceed. const isUserBlocked = await checkIfUserIsBlocked(user.id); if (isUserBlocked) { - Alert.alert('You cannot view this profile'); + Alert.alert(ERROR_UNABLE_TO_VIEW_PROFILE); return; } const jsonValue = await AsyncStorage.getItem( |
