From 1bed2a96e83e06613c8255d1264b10d7afee6720 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Mon, 29 Mar 2021 18:52:40 -0400 Subject: reset url in state after editing profile --- src/store/actions/user.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/store/actions') 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, + RootState, + unknown, + Action +> => async (dispatch) => { + await dispatch({ + type: clearHeaderAndProfileImages.type, + payload: {}, + }); +}; + /** * To update editable socials * @param social social to be updated -- cgit v1.2.3-70-g09d2