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"
1111
1212import { DESKTOP_LANGUAGE_BUTTON_NAME } from "@/lib/constants"
1313
14+ import { Button } from "../../ui/buttons/Button"
1415import { useNavigation } from "../useNavigation"
1516import { useThemeToggle } from "../useThemeToggle"
1617
1718import { useBreakpointValue } from "@/hooks/useBreakpointValue"
1819import { useTranslation } from "@/hooks/useTranslation"
1920
20- const Button = dynamic (
21+ const LazyButton = dynamic (
2122 ( ) => import ( "../../ui/buttons/Button" ) . then ( ( mod ) => mod . Button ) ,
2223 {
2324 ssr : false ,
@@ -126,15 +127,15 @@ const ClientSideNav = () => {
126127 </ SearchProvider >
127128
128129 { desktopScreen && (
129- < Button
130+ < LazyButton
130131 aria-label = { themeIconAriaLabel }
131132 variant = "ghost"
132133 isSecondary
133134 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"
134135 onClick = { toggleColorMode }
135136 >
136137 < ThemeIcon className = "transform-transform duration-500 group-hover:rotate-12 group-hover:transition-transform group-hover:duration-500" />
137- </ Button >
138+ </ LazyButton >
138139 ) }
139140
140141 { desktopScreen && (
@@ -156,6 +157,4 @@ const ClientSideNav = () => {
156157 )
157158}
158159
159- ClientSideNav . displayName = "ClientSideNav"
160-
161160export default ClientSideNav
You can’t perform that action at this time.
0 commit comments