aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-02-11 14:04:04 -0800
committerShravya Ramesh <shravs1208@gmail.com>2021-02-11 14:04:04 -0800
commitda61f04d037d92fce7cf9852a3be79eb41158d5a (patch)
tree4034b9084399dd3368b3ad1b4fbae7350fb5e430 /src
parentebc1b4dd9a39a1d82cb81f070bcae1f9f2146832 (diff)
dispatching reducer while updating backend
Diffstat (limited to 'src')
-rw-r--r--src/services/UserProfileService.ts1
-rw-r--r--src/store/actions/user.ts10
2 files changed, 4 insertions, 7 deletions
diff --git a/src/services/UserProfileService.ts b/src/services/UserProfileService.ts
index 9061dd5e..3bca66f3 100644
--- a/src/services/UserProfileService.ts
+++ b/src/services/UserProfileService.ts
@@ -336,7 +336,6 @@ export const editSPSwipeTutorial = async (user: UserType) => {
body: request,
});
if (response.status === 200) {
- console.log('updatedbackend');
return true;
} else {
return false;
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts
index 98e1727b..50f810e4 100644
--- a/src/store/actions/user.ts
+++ b/src/store/actions/user.ts
@@ -158,12 +158,10 @@ export const updateSPSwipeTutorial = (
> => async (dispatch) => {
try {
const success = await editSPSwipeTutorial(user);
- if (success) {
- dispatch({
- type: spSwipeTutorialUpdated.type,
- payload: {sp_swipe_tutorial: data},
- });
- }
+ dispatch({
+ type: spSwipeTutorialUpdated.type,
+ payload: {sp_swipe_tutorial: data},
+ });
return success;
} catch (error) {
console.log('Error while updating suggested people linked state: ', error);