diff options
| author | Ashm Walia <ashmwalia@outlook.com> | 2021-01-31 02:25:53 -0800 |
|---|---|---|
| committer | Ashm Walia <ashmwalia@outlook.com> | 2021-01-31 02:25:53 -0800 |
| commit | a3000926cb26d9ca2afba116d875653783fb622b (patch) | |
| tree | a11923d1336aedc712eb3f4073e386879d85035f /src/store/actions | |
| parent | c08699f541089aed989f3f481d10f890c3064170 (diff) | |
Fixed
Diffstat (limited to 'src/store/actions')
| -rw-r--r-- | src/store/actions/user.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts index 0b1ea789..af942592 100644 --- a/src/store/actions/user.ts +++ b/src/store/actions/user.ts @@ -1,3 +1,4 @@ +import { CommentThreadType } from './../../types/types'; import {RootState} from '../rootReducer'; import {UserType} from '../../types/types'; import {loadProfileInfo, loadAvatar, loadCover} from '../../services'; @@ -9,6 +10,7 @@ import { profileCompletionStageUpdated, setIsOnboardedUser, setNewNotificationReceived, + setReplyPosted, } from '../reducers'; import {getTokenOrLogout} from '../../utils'; @@ -111,6 +113,22 @@ export const updateNewNotificationReceived = ( } }; +export const updateReplyPosted = ( + replyPosted: CommentThreadType | undefined, +): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async ( + dispatch, +) => { + console.log(replyPosted); + try { + dispatch({ + type: setReplyPosted.type, + payload: {replyPosted}, + }); + } catch (error) { + console.log(error); + } +}; + export const logout = (): ThunkAction< Promise<void>, RootState, |
