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
|
@ -4,8 +4,6 @@
|
|||
import { useCallback, useEffect } from 'react';
|
||||
import { get } from 'lodash';
|
||||
import { useSelector } from 'react-redux';
|
||||
|
||||
import type { StateType } from '../state/reducer';
|
||||
import * as KeyboardLayout from '../services/keyboardLayout';
|
||||
import { getHasPanelOpen } from '../state/selectors/conversations';
|
||||
import { isInFullScreenCall } from '../state/selectors/calling';
|
||||
|
@ -33,11 +31,11 @@ function useHasPanels(): boolean {
|
|||
}
|
||||
|
||||
function useHasGlobalModal(): boolean {
|
||||
return useSelector<StateType, boolean>(isShowingAnyModal);
|
||||
return useSelector(isShowingAnyModal);
|
||||
}
|
||||
|
||||
function useHasCalling(): boolean {
|
||||
return useSelector<StateType, boolean>(isInFullScreenCall);
|
||||
return useSelector(isInFullScreenCall);
|
||||
}
|
||||
|
||||
function useHasAnyOverlay(): boolean {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue