File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/components/Nav/Client Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ import { Skeleton } from "@/components/ui/skeleton"
11
11
12
12
import { DESKTOP_LANGUAGE_BUTTON_NAME } from "@/lib/constants"
13
13
14
+ import { Button } from "../../ui/buttons/Button"
14
15
import { useNavigation } from "../useNavigation"
15
16
import { useThemeToggle } from "../useThemeToggle"
16
17
17
18
import { useBreakpointValue } from "@/hooks/useBreakpointValue"
18
19
import { useTranslation } from "@/hooks/useTranslation"
19
20
20
- const Button = dynamic (
21
+ const LazyButton = dynamic (
21
22
( ) => import ( "../../ui/buttons/Button" ) . then ( ( mod ) => mod . Button ) ,
22
23
{
23
24
ssr : false ,
@@ -126,15 +127,15 @@ const ClientSideNav = () => {
126
127
</ SearchProvider >
127
128
128
129
{ desktopScreen && (
129
- < Button
130
+ < LazyButton
130
131
aria-label = { themeIconAriaLabel }
131
132
variant = "ghost"
132
133
isSecondary
133
134
className = "group animate-fade-in px-2 max-md:hidden xl:px-3 [&>svg]:transition-transform [&>svg]:duration-500 [&>svg]:hover:rotate-12 [&>svg]:hover:text-primary-hover"
134
135
onClick = { toggleColorMode }
135
136
>
136
137
< ThemeIcon className = "transform-transform duration-500 group-hover:rotate-12 group-hover:transition-transform group-hover:duration-500" />
137
- </ Button >
138
+ </ LazyButton >
138
139
) }
139
140
140
141
{ desktopScreen && (
@@ -156,6 +157,4 @@ const ClientSideNav = () => {
156
157
)
157
158
}
158
159
159
- ClientSideNav . displayName = "ClientSideNav"
160
-
161
160
export default ClientSideNav
You can’t perform that action at this time.
0 commit comments