diff options
Diffstat (limited to 'src/store/actions')
| -rw-r--r-- | src/store/actions/user.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts index 990f9260..bfbe9c80 100644 --- a/src/store/actions/user.ts +++ b/src/store/actions/user.ts @@ -12,6 +12,7 @@ import { setIsOnboardedUser, setNewNotificationReceived, setNewVersionAvailable, + setOnboardedSuggestedPeople, setReplyPosted, socialEdited, userDetailsFetched, @@ -90,6 +91,24 @@ export const updateProfileCompletionStage = ( } }; +// TODO: this should be called after a successful upload of a first SP image +export const updateOnboardedSuggestedPeople = ( + onboarded: boolean, + callback: () => {}, +): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async ( + dispatch, +) => { + try { + dispatch({ + type: setOnboardedSuggestedPeople.type, + payload: {onboarded}, + }); + callback(); + } catch (error) { + console.log(error); + } +}; + export const updateIsOnboardedUser = ( isOnboardedUser: boolean, ): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async ( |
