Files
bigcapital/client/src/store/search/search.reducer.js
2021-08-07 22:26:57 +02:00

17 lines
316 B
JavaScript

import t from 'store/types';
import { createReducer } from '@reduxjs/toolkit';
const initialState = {
isOpen: false,
};
export default createReducer(initialState, {
[t.OPEN_SEARCH]: (state, action) => {
state.isOpen = true;
},
[t.CLOSE_SEARCH]: (state, action) => {
state.isOpen = false;
},
});