lbry-desktop/ui/js/selectors/user.js

28 lines
No EOL
641 B
JavaScript

import { createSelector } from 'reselect'
export const _selectState = state => state.user || {}
export const selectAuthenticationIsPending = createSelector(
_selectState,
(state) => state.authenticationIsPending
)
export const selectUser = createSelector(
_selectState,
(state) => state.user
)
export const selectEmailNewIsPending = createSelector(
_selectState,
(state) => state.emailNewIsPending
)
export const selectEmailNewErrorMessage = createSelector(
_selectState,
(state) => state.emailNewErrorMessage
)
export const selectEmailNewDeclined = createSelector(
_selectState,
(state) => state.emailNewDeclined
)