Refactor smart components
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
05c09ef769
commit
27b55e472d
109 changed files with 3583 additions and 2629 deletions
18
ts/state/selectors/crashReports.ts
Normal file
18
ts/state/selectors/crashReports.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
import { createSelector } from 'reselect';
|
||||
import type { StateType } from '../reducer';
|
||||
import type { CrashReportsStateType } from '../ducks/crashReports';
|
||||
|
||||
const getCrashReports = (state: StateType): CrashReportsStateType =>
|
||||
state.crashReports;
|
||||
|
||||
export const getCrashReportsIsPending = createSelector(
|
||||
getCrashReports,
|
||||
({ isPending }) => isPending
|
||||
);
|
||||
|
||||
export const getCrashReportCount = createSelector(
|
||||
getCrashReports,
|
||||
({ count }) => count
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue