aboutsummaryrefslogtreecommitdiff
path: root/src/store/actions
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-03-29 18:52:40 -0400
committerIvan Chen <ivan@tagg.id>2021-03-29 18:52:40 -0400
commit1bed2a96e83e06613c8255d1264b10d7afee6720 (patch)
tree7cc98222fcc73f79125dba08bb1116dc211c8b0e /src/store/actions
parentaf2136ff699ac4556732da4e262add82c15b2b5c (diff)
reset url in state after editing profile
Diffstat (limited to 'src/store/actions')
-rw-r--r--src/store/actions/user.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts
index 46f96d9a..10132dd9 100644
--- a/src/store/actions/user.ts
+++ b/src/store/actions/user.ts
@@ -7,6 +7,7 @@ import {
import {UserType} from '../../types/types';
import {getTokenOrLogout} from '../../utils';
import {
+ clearHeaderAndProfileImages,
profileCompletionStageUpdated,
setIsOnboardedUser,
setNewNotificationReceived,
@@ -54,6 +55,18 @@ export const loadUserData = (
}
};
+export const resetHeaderAndProfileImage = (): ThunkAction<
+ Promise<void>,
+ RootState,
+ unknown,
+ Action<string>
+> => async (dispatch) => {
+ await dispatch({
+ type: clearHeaderAndProfileImages.type,
+ payload: {},
+ });
+};
+
/**
* To update editable socials
* @param social social to be updated