Refactor smart components

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
Jamie Kyle 2024-03-13 13:44:13 -07:00 committed by GitHub
parent 05c09ef769
commit 27b55e472d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
109 changed files with 3583 additions and 2629 deletions

View file

@ -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 {