diff options
| author | Ivan Chen <ivan@thetaggid.com> | 2021-01-20 15:52:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-20 15:52:37 -0500 |
| commit | 7b45e8d238f392183f3c1742f22495a2f9c6fb7f (patch) | |
| tree | bab6621bf916e9efa0ce863cf49b649bd6ba6548 /src/store/actions | |
| parent | a64a0c53f108f8ea9c9ac0ba67c34ff82007271e (diff) | |
| parent | 623bc69013c8fd173e49fb059eaba23c9219e0eb (diff) | |
Merge pull request #192 from ashmgarv/tma515-new-no-icon
[TMA - 515] New notifications icon and reordering of bottom navigation stack
Diffstat (limited to 'src/store/actions')
| -rw-r--r-- | src/store/actions/user.ts | 16 |
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, |
