import { RECEIVE_API_ERROR } from '../actions/error.js';

const defaultState = {};

export const error = (state = { ...defaultState }, action) => {
  switch (action.type) {
    case RECEIVE_API_ERROR:
      return { ...state, error: action.error };
    default:
      return {};
  }
};
