add contests

This commit is contained in:
Виталий Лавшонок
2025-12-05 23:42:18 +03:00
parent 358c7def78
commit fd34761745
36 changed files with 2518 additions and 710 deletions

View File

@@ -7,6 +7,9 @@ interface StorState {
activeProfilePage: string;
activeGroupPage: string;
};
group: {
groupFilter: string;
};
}
// Инициализация состояния
@@ -16,6 +19,9 @@ const initialState: StorState = {
activeProfilePage: '',
activeGroupPage: '',
},
group: {
groupFilter: '',
},
};
// Slice
@@ -38,6 +44,9 @@ const storeSlice = createSlice({
) => {
state.menu.activeGroupPage = activeGroupPage.payload;
},
setGroupFilter: (state, groupFilter: PayloadAction<string>) => {
state.group.groupFilter = groupFilter.payload;
},
},
});
@@ -45,6 +54,7 @@ export const {
setMenuActivePage,
setMenuActiveProfilePage,
setMenuActiveGroupPage,
setGroupFilter,
} = storeSlice.actions;
export const storeReducer = storeSlice.reducer;