text: import {
    RECEIVE_SESSION_ERRORS,
    RECEIVE_CURRENT_USER,
    CLEAR_SESSION_ERRORS    } from '../actions/session';
  
  export default (state = [], action) => {
    Object.freeze(state);
    switch(action.type) {
      case RECEIVE_SESSION_ERRORS:
        return action.errors;
      case CLEAR_SESSION_ERRORS:
      case RECEIVE_CURRENT_USER:
        return [];
      default:
        return state;
    }
  };
  