text: import produce from 'immer';
  
  const INITIAL_STATE = {
    profile: null,
  };
  
  const user = (state = INITIAL_STATE, action) => {
    return produce(state, draft => {
      switch (action.type) {
        case '@auth/SIGN_IN_SUCCESS':
          draft.profile = action.payload.student;
          break;
        case '@auth/SIGN_OUT':
          draft.profile = null;
          break;
        default:
      }
    });
  };
  
  export default user;
  