evoleasing-account/reducers/companiesReducer.js
2022-08-15 23:50:12 +03:00

24 lines
413 B
JavaScript

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