Username Education
Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
parent
c6a7637513
commit
7dc11c1928
100 changed files with 1443 additions and 1269 deletions
|
@ -5,6 +5,7 @@ import { createSelector } from 'reselect';
|
|||
|
||||
import type { StateType } from '../reducer';
|
||||
import type { GlobalModalsStateType } from '../ducks/globalModals';
|
||||
import { UsernameOnboardingState } from '../../types/globalModals';
|
||||
|
||||
export const getGlobalModalsState = (state: StateType): GlobalModalsStateType =>
|
||||
state.globalModals;
|
||||
|
@ -12,5 +13,11 @@ export const getGlobalModalsState = (state: StateType): GlobalModalsStateType =>
|
|||
export const isShowingAnyModal = createSelector(
|
||||
getGlobalModalsState,
|
||||
(globalModalsState): boolean =>
|
||||
Object.values(globalModalsState).some(value => Boolean(value))
|
||||
Object.entries(globalModalsState).some(([key, value]) => {
|
||||
if (key === 'usernameOnboardingState') {
|
||||
return value === UsernameOnboardingState.Open;
|
||||
}
|
||||
|
||||
return Boolean(value);
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue