aboutsummaryrefslogtreecommitdiff
path: root/src/store/actions
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-02-09 16:27:34 -0500
committerIvan Chen <ivan@tagg.id>2021-02-11 17:46:32 -0500
commit5db2a2b38225a143e23ab635dbecadfb424a4546 (patch)
tree9d60d6378a0b52734bc6edc9db97bd3c6da95b8a /src/store/actions
parentd494b27509066f4d1b61078f1fe6457f20d5f449 (diff)
added onboarded flag to store
Diffstat (limited to 'src/store/actions')
-rw-r--r--src/store/actions/user.ts19
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 (