aboutsummaryrefslogtreecommitdiff
path: root/src/utils/users.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/users.ts')
-rw-r--r--src/utils/users.ts2
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;