group posts

This commit is contained in:
Виталий Лавшонок
2025-11-15 22:23:26 +03:00
parent dfc2985209
commit 56b6f9b339
28 changed files with 624 additions and 47 deletions

View File

@@ -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;