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/store/actions/user.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/store') 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