signal-desktop/ts/state/selectors/app.ts
Jamie Kyle 27b55e472d
Refactor smart components
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
2024-03-13 13:44:13 -07:00

12 lines
421 B
TypeScript

// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { createSelector } from 'reselect';
import type { StateType } from '../reducer';
import type { AppStateType } from '../ducks/app';
export const getApp = (state: StateType): AppStateType => state.app;
export const getHasInitialLoadCompleted = createSelector(
getApp,
({ hasInitialLoadCompleted }) => hasInitialLoadCompleted
);