Skip to content

Commit

Permalink
Add user display name selector #112
Browse files Browse the repository at this point in the history
  • Loading branch information
knightburton committed Feb 10, 2022
1 parent 8aef78b commit 970f12d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/store/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const getUser = (state: RootState): User | null => state.auth.user;
export const getIsAuthenticated = createSelector<[typeof getUser], boolean>(getUser, user => !!user);
export const getUserId = createSelector<[typeof getUser], string>(getUser, user => user?.uid || '');
export const getUserProfilePhoto = createSelector<[typeof getUser], string>(getUser, user => user?.photoURL || '');
export const getUserDisplayName = createSelector<[typeof getUser], string>(getUser, user => user?.displayName || '');
export const getUserDisplayNameFirstCharacter = createSelector<[typeof getUser], string>(getUser, user => (user?.displayName || user?.email || '').charAt(0));
export const getUserEmailIsVerified = createSelector<[typeof getUser], boolean>(getUser, user => !!user?.emailVerified);

Expand Down

0 comments on commit 970f12d

Please sign in to comment.