aboutsummaryrefslogtreecommitdiff
path: root/src/store
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-03-29 17:36:21 -0400
committerGitHub <noreply@github.com>2021-03-29 17:36:21 -0400
commite7865305f77f801dd5f1c06c506c626192877fd8 (patch)
tree3ed42fb2a394eb3a8dd5fa1dadd5881ea87eb7cd /src/store
parentad2ad5d232473d38426c2f0f8283ba015dadfd4c (diff)
parente8d862e5e6dd8a6a517a93c65e30795813af936d (diff)
Merge pull request #304 from TaggiD-Inc/tma-700-private-account-toggle
[TMA 700] : Private Account toggle + Settings Screen
Diffstat (limited to 'src/store')
-rw-r--r--src/store/actions/user.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts
index 46f96d9a..374154da 100644
--- a/src/store/actions/user.ts
+++ b/src/store/actions/user.ts
@@ -1,3 +1,4 @@
+import AsyncStorage from '@react-native-community/async-storage';
import {Action, ThunkAction} from '@reduxjs/toolkit';
import {
getProfilePic,
@@ -157,6 +158,7 @@ export const logout = (): ThunkAction<
Action<string>
> => async (dispatch) => {
try {
+ await AsyncStorage.clear();
dispatch({type: userLoggedIn.type, payload: {userId: '', username: ''}});
} catch (error) {
console.log(error);