You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
596 B
TypeScript
21 lines
596 B
TypeScript
import { createSelector } from '@reduxjs/toolkit';
|
|
|
|
import { LocalizerType } from '../../types/Util';
|
|
|
|
import { StateType } from '../reducer';
|
|
import { UserStateType } from '../ducks/user';
|
|
|
|
export const getUser = (state: StateType): UserStateType => state.user;
|
|
|
|
export const getOurNumber = createSelector(
|
|
getUser,
|
|
(state: UserStateType): string => state.ourNumber
|
|
);
|
|
|
|
export const getOurDisplayNameInProfile = createSelector(
|
|
getUser,
|
|
(state: UserStateType): string => state.ourDisplayNameInProfile
|
|
);
|
|
|
|
export const getIntl = createSelector(getUser, (): LocalizerType => window.i18n);
|