aboutsummaryrefslogtreecommitdiff
path: root/src/store/actions
diff options
context:
space:
mode:
authorAshm Walia <ashmwalia@outlook.com>2021-01-19 11:36:56 -0800
committerAshm Walia <ashmwalia@outlook.com>2021-01-19 11:36:56 -0800
commitc510ba308738fc88edb11772fe9db6ec4537427f (patch)
tree86ca27286d50c35ec9a4b6362c8b42408ac85160 /src/store/actions
parentbb885ff561e44e23f9fb27ba8aa18f4dce8c690e (diff)
Done
Diffstat (limited to 'src/store/actions')
-rw-r--r--src/store/actions/user.ts16
1 files changed, 16 insertions, 0 deletions
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<Promise<void>, RootState, unknown, Action<string>> => async (
+ dispatch,
+) => {
+ try {
+ dispatch({
+ type: setNewNotificationReceived.type,
+ payload: {newNotificationReceived},
+ });
+ } catch (error) {
+ console.log(error);
+ }
+};
+
export const logout = (): ThunkAction<
Promise<void>,
RootState,