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
|
@ -11,6 +11,26 @@ import type { UpdatesStateType } from '../ducks/updates';
|
|||
export const getUpdatesState = (state: Readonly<StateType>): UpdatesStateType =>
|
||||
state.updates;
|
||||
|
||||
export const getUpdateDialogType = createSelector(
|
||||
getUpdatesState,
|
||||
({ dialogType }) => dialogType
|
||||
);
|
||||
|
||||
export const getUpdateVersion = createSelector(
|
||||
getUpdatesState,
|
||||
({ version }) => version
|
||||
);
|
||||
|
||||
export const getUpdateDownloadSize = createSelector(
|
||||
getUpdatesState,
|
||||
({ downloadSize }) => downloadSize
|
||||
);
|
||||
|
||||
export const getUpdateDownloadedSize = createSelector(
|
||||
getUpdatesState,
|
||||
({ downloadedSize }) => downloadedSize
|
||||
);
|
||||
|
||||
export const isUpdateDialogVisible = createSelector(
|
||||
getUpdatesState,
|
||||
({ dialogType, didSnooze }) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue