From c510ba308738fc88edb11772fe9db6ec4537427f Mon Sep 17 00:00:00 2001 From: Ashm Walia Date: Tue, 19 Jan 2021 11:36:56 -0800 Subject: Done --- src/store/actions/user.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/store/actions') diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts index 8550f3bd..0b1ea789 100644 --- a/src/store/actions/user.ts +++ b/src/store/actions/user.ts @@ -8,6 +8,7 @@ import { socialEdited, profileCompletionStageUpdated, setIsOnboardedUser, + setNewNotificationReceived, } from '../reducers'; import {getTokenOrLogout} from '../../utils'; @@ -95,6 +96,21 @@ export const updateIsOnboardedUser = ( } }; +export const updateNewNotificationReceived = ( + newNotificationReceived: boolean, +): ThunkAction, RootState, unknown, Action> => async ( + dispatch, +) => { + try { + dispatch({ + type: setNewNotificationReceived.type, + payload: {newNotificationReceived}, + }); + } catch (error) { + console.log(error); + } +}; + export const logout = (): ThunkAction< Promise, RootState, -- cgit v1.2.3-70-g09d2