Skip to content

Commit 212100c

Browse files
committed
Don't lazy load KeyboardShortcut (tsc incompatibility)
1 parent 25deb15 commit 212100c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

packages/ra-ui-materialui/src/layout/MenuItemLink.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, {
22
forwardRef,
3-
lazy,
43
useCallback,
54
useRef,
65
type ReactElement,
@@ -26,14 +25,9 @@ import {
2625
import { useTranslate, useBasename, useEvent } from 'ra-core';
2726
import type { Keys } from 'react-hotkeys-hook';
2827
import { useSidebarState } from './useSidebarState';
28+
import { KeyboardShortcut } from '../KeyboardShortcut';
2929
import { getKeyboardShortcutLabel } from '../getKeyboardShortcutLabel';
3030

31-
const KeyboardShortcut = lazy(() =>
32-
import('../KeyboardShortcut').then(module => ({
33-
default: module.KeyboardShortcut,
34-
}))
35-
);
36-
3731
/**
3832
* Displays a menu item with a label and an icon - or only the icon with a tooltip when the sidebar is minimized.
3933
* It also handles the automatic closing of the menu on tap on mobile.

0 commit comments

Comments
 (0)