diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-22 14:32:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 14:32:15 -0400 |
commit | f0cff95cfa612b295caf68552bc3d29a7fb23a42 (patch) | |
tree | dd3df697478a19048cd4bf6d0b499a91c1a93eb3 /src/services/UserProfileService.ts | |
parent | 4e8e1c0d58424e6b63cfb8470fc0a73c0e6b102b (diff) | |
parent | 33c172cc31957966b14321520c56816ba044db14 (diff) |
Merge pull request #374 from IvanIFChen/hotfix-linting-fixup
[HOTFIX] Linter fixup
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 a2237c94..c11d874f 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, @@ -31,6 +29,7 @@ import { SUCCESS_PWD_RESET, SUCCESS_VERIFICATION_CODE_SENT, } from '../constants/strings'; +import {loadUserData} from '../store/actions'; import { ProfileInfoType, ProfileType, @@ -113,7 +112,6 @@ export const updateProfileVisibility = async ( ); } } catch (error) { - debugger; Alert.alert(ERROR_PROFILE_UPDATE_SHORT, ERROR_DOUBLE_CHECK_CONNECTION); return { name: 'Profile update error', @@ -182,7 +180,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}`, ); @@ -216,7 +214,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); @@ -248,9 +246,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); |