aboutsummaryrefslogtreecommitdiff
path: root/src/services/UserFriendsServices.ts
diff options
context:
space:
mode:
authorAshm Walia <40498934+ashmgarv@users.noreply.github.com>2021-01-16 09:51:36 -0800
committerGitHub <noreply@github.com>2021-01-16 09:51:36 -0800
commit9711093bfa5810868e3cd17008bb7b3ddc7b9034 (patch)
tree6a8bb4341b1623cfc2da86af4b3b28c1fd3f8a44 /src/services/UserFriendsServices.ts
parentd85eaeb878cbbeedda860ee5809b81100c910af2 (diff)
parent30391867438bb28cbcba9fc9ee2ff6d00027fd86 (diff)
Merge branch 'master' into tma538-friend-requests
Diffstat (limited to 'src/services/UserFriendsServices.ts')
-rw-r--r--src/services/UserFriendsServices.ts11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/services/UserFriendsServices.ts b/src/services/UserFriendsServices.ts
index 18a92481..f2e15824 100644
--- a/src/services/UserFriendsServices.ts
+++ b/src/services/UserFriendsServices.ts
@@ -3,6 +3,7 @@
import {Alert} from 'react-native';
import {FriendshipStatusType} from 'src/types';
import {FRIENDS_ENDPOINT} from '../constants';
+import {ERROR_SOMETHING_WENT_WRONG_REFRESH} from '../constants/strings';
export const loadFriends = async (userId: string, token: string) => {
try {
@@ -104,18 +105,12 @@ export const declineFriendRequestService = 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;
}
};