import { HYDRATE } from 'next-redux-wrapper';

import * as actionTypes from '../constants/actionTypes';
import initialState from "./initialState";

const contractEventsReducer = (state = initialState.contract_events, action) => 
{
	switch (action.type) 
	{
		case actionTypes.CONTRACT_EVENTS: 
		{
			return {
				...state, ...action.data, 
			};
		}

		case actionTypes.CONTRACT_EVENTS_RESET: 
		{
			return {};
		}

		default: {
			return state;
		}
	}
};

export default contractEventsReducer;