evoleasing-account/reducers/contractEventsReducer.js
2022-09-07 13:24:27 +03:00

28 lines
496 B
JavaScript

import { HYDRATE } from 'next-redux-wrapper';
import * as actionTypes from '../constants/actionTypes';
import initialState from "./initialState";
const contractEventsReducer = (state = initialState.contract_events, action) =>
{
switch (action.type)
{
case actionTypes.CONTRACT_EVENTS:
{
return {
...state, ...action.data,
};
}
case actionTypes.CONTRACT_EVENTS_RESET:
{
return {};
}
default: {
return state;
}
}
};
export default contractEventsReducer;