diff options
Diffstat (limited to 'src/services/UserFriendsServices.ts')
-rw-r--r-- | src/services/UserFriendsServices.ts | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/services/UserFriendsServices.ts b/src/services/UserFriendsServices.ts index 0b138fc3..f7a39abf 100644 --- a/src/services/UserFriendsServices.ts +++ b/src/services/UserFriendsServices.ts @@ -2,6 +2,7 @@ import {Alert} from 'react-native'; import {FRIENDS_ENDPOINT} from '../constants'; +import {ERROR_SOMETHING_WENT_WRONG_REFRESH} from '../constants/strings'; export const loadFriends = async (userId: string, token: string) => { try { @@ -46,18 +47,12 @@ export const friendOrUnfriendUser = async ( return true; } else { console.log(await response.json()); - Alert.alert( - 'Something went wrong! ðŸ˜', - "Would you believe me if I told you that I don't know what happened?", - ); + Alert.alert(ERROR_SOMETHING_WENT_WRONG_REFRESH); return false; } } catch (error) { console.log(error); - Alert.alert( - 'Something went wrong! ðŸ˜', - "Would you believe me if I told you that I don't know what happened?", - ); + Alert.alert(ERROR_SOMETHING_WENT_WRONG_REFRESH); return false; } }; |