evoleasing-account/reducers/eventsReducer.js
2022-08-08 07:05:49 +03:00

32 lines
501 B
JavaScript

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