group posts
This commit is contained in:
@@ -5,6 +5,7 @@ interface StorState {
|
||||
menu: {
|
||||
activePage: string;
|
||||
activeProfilePage: string;
|
||||
activeGroupPage: string;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,6 +14,7 @@ const initialState: StorState = {
|
||||
menu: {
|
||||
activePage: '',
|
||||
activeProfilePage: '',
|
||||
activeGroupPage: '',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -30,9 +32,19 @@ const storeSlice = createSlice({
|
||||
) => {
|
||||
state.menu.activeProfilePage = activeProfilePage.payload;
|
||||
},
|
||||
setMenuActiveGroupPage: (
|
||||
state,
|
||||
activeGroupPage: PayloadAction<string>,
|
||||
) => {
|
||||
state.menu.activeGroupPage = activeGroupPage.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setMenuActivePage, setMenuActiveProfilePage } =
|
||||
storeSlice.actions;
|
||||
export const {
|
||||
setMenuActivePage,
|
||||
setMenuActiveProfilePage,
|
||||
setMenuActiveGroupPage,
|
||||
} = storeSlice.actions;
|
||||
|
||||
export const storeReducer = storeSlice.reducer;
|
||||
|
||||
Reference in New Issue
Block a user