24 lines
413 B
JavaScript
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; |