Skip to content

Commit 9e4b946

Browse files
committed
define imports outside of component declaration
1 parent 35370d8 commit 9e4b946

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Nav/Menu/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import type { NavSections } from "../types"
1818

1919
import { useNavMenu } from "./useNavMenu"
2020

21+
const MenuContent = dynamic(() => import("./MenuContent"))
22+
2123
type NavMenuProps = BaseHTMLAttributes<HTMLDivElement> & {
2224
sections: NavSections
2325
}
@@ -26,8 +28,6 @@ const Menu = ({ sections, ...props }: NavMenuProps) => {
2628
const { activeSection, direction, handleSectionChange, isOpen } =
2729
useNavMenu(sections)
2830

29-
const MenuContent = dynamic(() => import("./MenuContent"))
30-
3131
return (
3232
<div {...props}>
3333
<Root

0 commit comments

Comments
 (0)