import { FETCH_USER } from '../actions/types' /** * Records whether or not the user is logged in * * @export * @param {*} [state={}] * @param {*} action * @returns */ export default function (state = null, action) { switch (action.type) { case FETCH_USER: return action.payload || false; // if empty string returns false default: return state } }