feat: add post add interface

This commit is contained in:
0x29a
2021-06-27 23:15:42 +02:00
committed by Mehak Nasir
parent 7138e63cf0
commit b06832ae13
6 changed files with 204 additions and 6 deletions

View File

@@ -55,6 +55,7 @@ const threadsSlice = createSlice({
myPosts: MyPostsFilter.MY_POSTS,
search: '',
},
postEditorVisible: false,
sortedBy: ThreadOrdering.BY_LAST_ACTIVITY,
},
reducers: {
@@ -150,6 +151,12 @@ const threadsSlice = createSlice({
setSearchQuery: (state, { payload }) => {
state.filters.search = payload;
},
showPostEditor: (state) => {
state.postEditorVisible = true;
},
hidePostEditor: (state) => {
state.postEditorVisible = false;
},
},
});
@@ -179,6 +186,8 @@ export const {
setSortedBy,
setStatusFilter,
setSearchQuery,
showPostEditor,
hidePostEditor,
} = threadsSlice.actions;
export const threadsReducer = threadsSlice.reducer;