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;