diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-20 18:01:40 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-04-20 18:01:40 -0400 |
commit | bb1479dfcd8daad8ef2593d4ac65a0b1239a6139 (patch) | |
tree | ca3d73f914ccacb232f54011b7d6299984e17140 /src/services/UserProfileService.ts | |
parent | c4e76811cae6cf14d5cc8daed9317f808087ed77 (diff) |
linted
Diffstat (limited to 'src/services/UserProfileService.ts')
-rw-r--r-- | src/services/UserProfileService.ts | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/services/UserProfileService.ts b/src/services/UserProfileService.ts index 1ce1d0b5..9e93d479 100644 --- a/src/services/UserProfileService.ts +++ b/src/services/UserProfileService.ts @@ -1,8 +1,6 @@ import AsyncStorage from '@react-native-community/async-storage'; import moment from 'moment'; -import {useEffect} from 'react'; import {Alert} from 'react-native'; -import {loadUserData} from '../store/actions'; import { EDIT_PROFILE_ENDPOINT, GET_FB_POSTS_ENDPOINT, @@ -30,6 +28,7 @@ import { SUCCESS_PWD_RESET, SUCCESS_VERIFICATION_CODE_SENT, } from '../constants/strings'; +import {loadUserData} from '../store/actions'; import { ProfileInfoType, ProfileType, @@ -112,7 +111,6 @@ export const updateProfileVisibility = async ( ); } } catch (error) { - debugger; Alert.alert(ERROR_PROFILE_UPDATE_SHORT, ERROR_DOUBLE_CHECK_CONNECTION); return { name: 'Profile update error', @@ -181,7 +179,7 @@ export const handlePasswordResetRequest = async (value: string) => { ); return true; } else { - if (status == 404) { + if (status === 404) { Alert.alert( `Please make sure that the email / username entered is registered with us. You may contact our customer support at ${TAGG_CUSTOMER_SUPPORT}`, ); @@ -215,7 +213,7 @@ export const handlePasswordCodeVerification = async ( if (status === 200) { return true; } else { - if (status == 404) { + if (status === 404) { Alert.alert(ERROR_PWD_ACCOUNT(TAGG_CUSTOMER_SUPPORT)); } else if (status === 401) { Alert.alert(ERROR_INVALID_PWD_CODE); @@ -247,9 +245,9 @@ export const handlePasswordReset = async (value: string, password: string) => { Alert.alert(SUCCESS_PWD_RESET); return true; } else { - if (status == 404) { + if (status === 404) { Alert.alert(ERROR_PWD_ACCOUNT(TAGG_CUSTOMER_SUPPORT)); - } else if (status == 406) { + } else if (status === 406) { Alert.alert(ERROR_DUP_OLD_PWD); } else { Alert.alert(ERROR_SOMETHING_WENT_WRONG_REFRESH); |