signal-desktop/ts/state/selectors/crashReports.ts

18 lines
543 B
TypeScript

// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { createSelector } from 'reselect';
import type { StateType } from '../reducer.js';
import type { CrashReportsStateType } from '../ducks/crashReports.js';
const getCrashReports = (state: StateType): CrashReportsStateType =>
state.crashReports;
export const getCrashReportsIsPending = createSelector(
getCrashReports,
({ isPending }) => isPending
);
export const getCrashReportCount = createSelector(
getCrashReports,
({ count }) => count
);