Add account and articles updater

This commit is contained in:
Виталий Лавшонок
2025-11-05 11:43:18 +03:00
parent aeab03d35c
commit c6303758e1
22 changed files with 581 additions and 124 deletions

View File

@@ -4,6 +4,7 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit';
interface StorState {
menu: {
activePage: string;
activeProfilePage: string;
};
}
@@ -11,6 +12,7 @@ interface StorState {
const initialState: StorState = {
menu: {
activePage: '',
activeProfilePage: '',
},
};
@@ -22,8 +24,15 @@ const storeSlice = createSlice({
setMenuActivePage: (state, activePage: PayloadAction<string>) => {
state.menu.activePage = activePage.payload;
},
setMenuActiveProfilePage: (
state,
activeProfilePage: PayloadAction<string>,
) => {
state.menu.activeProfilePage = activeProfilePage.payload;
},
},
});
export const { setMenuActivePage } = storeSlice.actions;
export const { setMenuActivePage, setMenuActiveProfilePage } =
storeSlice.actions;
export const storeReducer = storeSlice.reducer;