add contests
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user