aboutsummaryrefslogtreecommitdiff
path: root/src/store/actions
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2021-02-05 13:29:46 -0500
committerGitHub <noreply@github.com>2021-02-05 13:29:46 -0500
commit07a2e3841d49b3fb278f17676c1007b003f58b9e (patch)
tree0e8c9ebdb03ac2e64172f9a593288f08e2a8108b /src/store/actions
parent454f5dec8cbf2065ba615fa83183cbde44ffee21 (diff)
parentc3cd8f95c6534fb5eb78af299ef424c50aefd85a (diff)
Merge branch 'master' into tma590-friendslist-buttons
Diffstat (limited to 'src/store/actions')
-rw-r--r--src/store/actions/user.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts
index 0b1ea789..5f49a103 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,21 @@ export const updateNewNotificationReceived = (
}
};
+export const updateReplyPosted = (
+ replyPosted: CommentThreadType | undefined,
+): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async (
+ dispatch,
+) => {
+ try {
+ dispatch({
+ type: setReplyPosted.type,
+ payload: {replyPosted},
+ });
+ } catch (error) {
+ console.log(error);
+ }
+};
+
export const logout = (): ThunkAction<
Promise<void>,
RootState,