guild_front/src/redux/reportSlice.js

22 lines
442 B
JavaScript
Raw Normal View History

2021-12-07 10:58:19 +03:00
import { createSlice } from '@reduxjs/toolkit';
const initialState = {
dateSelected: '',
};
export const reportSlice = createSlice({
name: 'report',
initialState,
reducers: {
dateSelected: (state, action) => {
state.dateSelected = action.payload;
},
},
});
export const { dateSelected, } = reportSlice.actions;
export const selectDate = (state) => state.report.dateSelected;
export default reportSlice.reducer;