evoleasing-account/reducers/companyReducer.js
2021-11-23 06:47:27 +03:00

34 lines
507 B
JavaScript

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