Update dependencies
Fix missing peer dependencies: - warning " > @graphql-codegen/client-preset@4.8.0" has unmet peer dependency "graphql-sock@^1.0.0". - warning " > @graphql-codegen/typescript-operations@4.6.0" has unmet peer dependency "graphql-sock@^1.0.0" Ignore missing peer dependency for "mui-nested-menu" (package itself doesn't get used but a copy&pasted and modified version of its "NestedMenuItem" component
This commit is contained in:
@@ -11,15 +11,15 @@ import { useHotkeysContext } from 'react-hotkeys-hook';
|
||||
import { HotkeyScope } from '@/modules/hotkeys/Hotkeys.types.ts';
|
||||
|
||||
export const useDisableAllHotkeysWhileMounted = (shouldDisable?: boolean) => {
|
||||
const { enabledScopes, enableScope, disableScope } = useHotkeysContext();
|
||||
const previouslyEnabledScopes = useRef<typeof enabledScopes>([]);
|
||||
const { activeScopes, enableScope, disableScope } = useHotkeysContext();
|
||||
const previouslyEnabledScopes = useRef<typeof activeScopes>([]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!shouldDisable) {
|
||||
return () => {};
|
||||
}
|
||||
|
||||
previouslyEnabledScopes.current = [...enabledScopes];
|
||||
previouslyEnabledScopes.current = [...activeScopes];
|
||||
|
||||
enableScope(HotkeyScope.NONE);
|
||||
previouslyEnabledScopes.current.forEach(disableScope);
|
||||
|
||||
Reference in New Issue
Block a user