aboutsummaryrefslogtreecommitdiff
path: root/src/store/actions
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-02-19 12:57:27 -0800
committerShravya Ramesh <shravs1208@gmail.com>2021-02-19 13:15:45 -0800
commit00c5763a4533b1105ffa4d04921906e0687aa201 (patch)
tree1dd78c622fb9fc29557c4211551a3f8f0e91b086 /src/store/actions
parent6bb1c27d4187b7bb5d822d29f498195f8497f432 (diff)
Minor change for better understanding of code
Diffstat (limited to 'src/store/actions')
-rw-r--r--src/store/actions/user.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts
index ef134dc5..30dfe8ba 100644
--- a/src/store/actions/user.ts
+++ b/src/store/actions/user.ts
@@ -163,16 +163,15 @@ export const logout = (): ThunkAction<
}
};
-export const uploadedSuggestedPeoplePhoto = (): ThunkAction<
- Promise<void>,
- RootState,
- unknown,
- Action<string>
-> => async (dispatch) => {
+export const uploadedSuggestedPeoplePhoto = (
+ suggested_people_linked: number,
+): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async (
+ dispatch,
+) => {
try {
dispatch({
type: setSuggestedPeopleLinked.type,
- payload: {stage: 1},
+ payload: suggested_people_linked,
});
} catch (error) {
console.log(error);
@@ -181,6 +180,7 @@ export const uploadedSuggestedPeoplePhoto = (): ThunkAction<
export const suggestedPeopleAnimatedTutorialFinished = (
userId: string,
+ suggested_people_linked: number,
): ThunkAction<
Promise<boolean | undefined>,
RootState,
@@ -194,7 +194,7 @@ export const suggestedPeopleAnimatedTutorialFinished = (
payload: {stage: 2},
});
// need to tell the server that the stage is now 2
- return await sendSuggestedPeopleLinked(userId, 2);
+ return await sendSuggestedPeopleLinked(userId, suggested_people_linked);
} catch (error) {
console.log('Error while updating suggested people linked state: ', error);
}