{"size": 374, "ext": "js", "max_stars_repo_path": "src/redux/auth/auth.selectors.js", "max_stars_repo_name": "yocompute/react-restaurant", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/redux/auth/auth.selectors.js", "max_issues_repo_name": "yocompute/react-restaurant", "max_issues_repo_issues_event_min_datetime": "2020-09-26T16:18:43.000Z", "max_issues_repo_issues_event_max_datetime": "2021-01-02T21:42:46.000Z", "max_forks_repo_path": "src/redux/auth/auth.selectors.js", "max_forks_repo_name": "zlkca/react-shop", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 18, "max_forks_count": null, "avg_line_length": 53.4285714286, "max_line_length": 97, "alphanum_fraction": 0.7540106952}
import { createSelector } from 'reselect'

export const selectAuth = state => state.auth;

export const selectTokenId = createSelector([selectAuth], auth => auth ? auth.tokenId: null);
export const selectAuthUser = createSelector([selectAuth], auth => auth ? auth.user: null);
export const selectAuthRoles = createSelector([selectAuthUser], user => user ? user.roles: null);