From da61f04d037d92fce7cf9852a3be79eb41158d5a Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Thu, 11 Feb 2021 14:04:04 -0800 Subject: dispatching reducer while updating backend --- src/services/UserProfileService.ts | 1 - src/store/actions/user.ts | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2