diff options
author | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-03-29 13:39:22 -0700 |
---|---|---|
committer | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-03-29 13:39:22 -0700 |
commit | e8d862e5e6dd8a6a517a93c65e30795813af936d (patch) | |
tree | 3ed42fb2a394eb3a8dd5fa1dadd5881ea87eb7cd /src/utils/users.ts | |
parent | bc1f377dfe4033f2fad28b7852dc09a72e0bd43e (diff) |
Logout changes
Diffstat (limited to 'src/utils/users.ts')
-rw-r--r-- | src/utils/users.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/users.ts b/src/utils/users.ts index f9d6d6b7..22c1c1f0 100644 --- a/src/utils/users.ts +++ b/src/utils/users.ts @@ -133,7 +133,7 @@ export const loadAllSocialsForUser = async (userId: string, token?: string) => { export const getTokenOrLogout = async (dispatch: Function): Promise<string> => { const token = await AsyncStorage.getItem('token'); if (!token) { - dispatch({type: userLoggedIn.type, payload: {userId: '', username: ''}}); + dispatch(logout()); return ''; } return token; |