

import { createSelector } from 'reselect'

export const getCurrentUser = state => state.user.currentUser
export const getErrorMessage = state => state.user.errorMessage
export const getIsFetching = state => state.user.isFetching  
export const getShowCaseHistory = state => state.user.showCaseHistory

export const getCurrentUserMenu = createSelector(
    getCurrentUser,
    user => !!user ? user.menu : undefined
)
