import * as types from '../actions/types';

const initialState = null;

export default (state = initialState, action) => {
  switch (action.type) {
    case types.SITE_SUCCESS:
      return action.site;
    case types.SITE_ERROR:
      return initialState;
    default:
      return state;
  }
};
