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
|
@ -23,6 +23,36 @@ export type CallStateType = DirectCallStateType | GroupCallStateType;
|
|||
|
||||
const getCalling = (state: StateType): CallingStateType => state.calling;
|
||||
|
||||
export const getAvailableMicrophones = createSelector(
|
||||
getCalling,
|
||||
({ availableMicrophones }) => availableMicrophones
|
||||
);
|
||||
|
||||
export const getSelectedMicrophone = createSelector(
|
||||
getCalling,
|
||||
({ selectedMicrophone }) => selectedMicrophone
|
||||
);
|
||||
|
||||
export const getAvailableSpeakers = createSelector(
|
||||
getCalling,
|
||||
({ availableSpeakers }) => availableSpeakers
|
||||
);
|
||||
|
||||
export const getSelectedSpeaker = createSelector(
|
||||
getCalling,
|
||||
({ selectedSpeaker }) => selectedSpeaker
|
||||
);
|
||||
|
||||
export const getAvailableCameras = createSelector(
|
||||
getCalling,
|
||||
({ availableCameras }) => availableCameras
|
||||
);
|
||||
|
||||
export const getSelectedCamera = createSelector(
|
||||
getCalling,
|
||||
({ selectedCamera }) => selectedCamera
|
||||
);
|
||||
|
||||
export const getActiveCallState = createSelector(
|
||||
getCalling,
|
||||
(state: CallingStateType) => state.activeCallState
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue