diff options
| author | Shravya Ramesh <37447613+shravyaramesh@users.noreply.github.com> | 2021-02-11 14:06:04 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-11 14:06:04 -0800 |
| commit | bcede9945a10ce7bf67aeeaf7f94e1a8984e7c0d (patch) | |
| tree | 229e130c90307507e68f17b016f81cf310822ccf /src/store/actions | |
| parent | da61f04d037d92fce7cf9852a3be79eb41158d5a (diff) | |
| parent | 2561d20e17a697726d6b77accf79c9da2d1f6ef6 (diff) | |
Merge branch 'master' into tma641-animation-tutorial
Diffstat (limited to 'src/store/actions')
| -rw-r--r-- | src/store/actions/user.ts | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts index 50f810e4..9f1855ce 100644 --- a/src/store/actions/user.ts +++ b/src/store/actions/user.ts @@ -8,17 +8,23 @@ import { editSPSwipeTutorial, } from '../../services'; import {Action, ThunkAction} from '@reduxjs/toolkit'; +import {loadAvatar, loadCover, loadProfileInfo} from '../../services'; +import {UserType} from '../../types/types'; +import {getTokenOrLogout} from '../../utils'; import { - userLoggedIn, - userDetailsFetched, - socialEdited, profileCompletionStageUpdated, setIsOnboardedUser, setNewNotificationReceived, + setNewVersionAvailable, setReplyPosted, + socialEdited, + userDetailsFetched, + userLoggedIn, } from '../reducers'; import {getTokenOrLogout} from '../../utils'; import {spSwipeTutorialUpdated} from '../reducers/userReducer'; +import {RootState} from '../rootReducer'; +import {CommentThreadType} from './../../types/types'; /** * Entry point to our store. @@ -104,6 +110,21 @@ export const updateIsOnboardedUser = ( } }; +export const updateNewVersionAvailable = ( + newVersionAvailable: boolean, +): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async ( + dispatch, +) => { + try { + dispatch({ + type: setNewVersionAvailable.type, + payload: {newVersionAvailable}, + }); + } catch (error) { + console.log(error); + } +}; + export const updateNewNotificationReceived = ( newNotificationReceived: boolean, ): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async ( |
