From e8d862e5e6dd8a6a517a93c65e30795813af936d Mon Sep 17 00:00:00 2001 From: ankit-thanekar007 Date: Mon, 29 Mar 2021 13:39:22 -0700 Subject: Logout changes --- src/utils/users.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils') 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 => { const token = await AsyncStorage.getItem('token'); if (!token) { - dispatch({type: userLoggedIn.type, payload: {userId: '', username: ''}}); + dispatch(logout()); return ''; } return token; -- cgit v1.2.3-70-g09d2