@@ -4,8 +4,6 @@ import * as NavigationMenu from "@radix-ui/react-navigation-menu"
4
4
5
5
import { Button } from "@/components/Buttons"
6
6
7
- import { isMobile } from "@/lib/utils/isMobile"
8
-
9
7
import { MAIN_NAV_ID , NAV_PY , SECTION_LABELS } from "@/lib/constants"
10
8
11
9
import type { NavSections } from "../types"
@@ -28,8 +26,6 @@ const Menu = ({ sections, ...props }: NavMenuProps) => {
28
26
onClose,
29
27
} = useNavMenu ( sections )
30
28
31
- const isDesktop = ! isMobile ( )
32
-
33
29
return (
34
30
< Box { ...props } >
35
31
< NavigationMenu . Root
@@ -85,34 +81,32 @@ const Menu = ({ sections, ...props }: NavMenuProps) => {
85
81
86
82
{ /* avoid rendering desktop menu on mobile */ }
87
83
{ /* Desktop Menu content */ }
88
- { isDesktop && (
89
- < NavigationMenu . Content asChild >
90
- { /**
91
- * This is the CONTAINER for all three menu levels
92
- * This renders inside the NavigationMenu.Viewport component
93
- */ }
94
- < Box
95
- as = { motion . div }
96
- variants = { containerVariants }
97
- initial = { false }
98
- animate = { isOpen ? "open" : "closed" }
99
- position = "absolute"
100
- top = "19"
101
- insetInline = "0"
102
- shadow = "md"
103
- border = "1px"
104
- borderColor = { menuColors . stroke }
105
- bg = { menuColors . lvl [ 1 ] . background }
106
- >
107
- < SubMenu
108
- lvl = { 1 }
109
- items = { items }
110
- activeSection = { activeSection }
111
- onClose = { onClose }
112
- />
113
- </ Box >
114
- </ NavigationMenu . Content >
115
- ) }
84
+ < NavigationMenu . Content asChild >
85
+ { /**
86
+ * This is the CONTAINER for all three menu levels
87
+ * This renders inside the NavigationMenu.Viewport component
88
+ */ }
89
+ < Box
90
+ as = { motion . div }
91
+ variants = { containerVariants }
92
+ initial = { false }
93
+ animate = { isOpen ? "open" : "closed" }
94
+ position = "absolute"
95
+ top = "19"
96
+ insetInline = "0"
97
+ shadow = "md"
98
+ border = "1px"
99
+ borderColor = { menuColors . stroke }
100
+ bg = { menuColors . lvl [ 1 ] . background }
101
+ >
102
+ < SubMenu
103
+ lvl = { 1 }
104
+ items = { items }
105
+ activeSection = { activeSection }
106
+ onClose = { onClose }
107
+ />
108
+ </ Box >
109
+ </ NavigationMenu . Content >
116
110
</ NavigationMenu . Item >
117
111
)
118
112
} ) }
0 commit comments