aboutsummaryrefslogtreecommitdiff
path: root/src/store/actions
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-02-20 11:56:32 -0500
committerIvan Chen <ivan@tagg.id>2021-02-20 11:56:32 -0500
commitf099df4589515da84a62c16d284bdee058ea5454 (patch)
tree9d073cf8d8075e211aed497ba3b20b315d237bad /src/store/actions
parentbd2df22d84c1c685802356fef52c8f26c44c188d (diff)
check if onboarded, added header, loads current sp image
Diffstat (limited to 'src/store/actions')
-rw-r--r--src/store/actions/user.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts
index 30dfe8ba..3511dcf3 100644
--- a/src/store/actions/user.ts
+++ b/src/store/actions/user.ts
@@ -163,15 +163,16 @@ export const logout = (): ThunkAction<
}
};
-export const uploadedSuggestedPeoplePhoto = (
- suggested_people_linked: number,
-): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async (
- dispatch,
-) => {
+export const uploadedSuggestedPeoplePhoto = (): ThunkAction<
+ Promise<void>,
+ RootState,
+ unknown,
+ Action<string>
+> => async (dispatch) => {
try {
dispatch({
type: setSuggestedPeopleLinked.type,
- payload: suggested_people_linked,
+ payload: {suggested_people_linked: 1},
});
} catch (error) {
console.log(error);
@@ -180,7 +181,6 @@ export const uploadedSuggestedPeoplePhoto = (
export const suggestedPeopleAnimatedTutorialFinished = (
userId: string,
- suggested_people_linked: number,
): ThunkAction<
Promise<boolean | undefined>,
RootState,
@@ -191,10 +191,10 @@ export const suggestedPeopleAnimatedTutorialFinished = (
// update store first, assume request is successful
dispatch({
type: setSuggestedPeopleLinked.type,
- payload: {stage: 2},
+ payload: {suggested_people_linked: 2},
});
// need to tell the server that the stage is now 2
- return await sendSuggestedPeopleLinked(userId, suggested_people_linked);
+ return await sendSuggestedPeopleLinked(userId, 2);
} catch (error) {
console.log('Error while updating suggested people linked state: ', error);
}