19 lines
415 B
JavaScript
19 lines
415 B
JavaScript
import { createSlice } from "@reduxjs/toolkit";
|
|
|
|
export const appSlice = createSlice({
|
|
name: "app_reducer",
|
|
initialState: {
|
|
noticeCount: 0,
|
|
},
|
|
reducers: {
|
|
getNoticeCount: (state, { payload }) => {
|
|
state.noticeCount = payload;
|
|
},
|
|
},
|
|
});
|
|
|
|
// Action creators are generated for each case reducer function
|
|
export const { getNoticeCount } = appSlice.actions;
|
|
|
|
export default appSlice.reducer;
|