text: import { GET_ERRORS, CLEAR_ERRORS } from '../actions/types';
  
  const initialState = {
    msg: false,
    status: "",
    id: ""
  }
  
  export default function(state = initialState, action) {
    switch(action.type) {
      case GET_ERRORS:
        return {
          msg: action.payload.msg,
          status: action.payload.status,
          id: action.payload.id
        };
      case CLEAR_ERRORS:
        return {
          msg: false,
          status: null,
          id: null
        };
      default:
        return state;
    }
  }