Skip to content

Commit d44e9e9

Browse files
authored
Merge pull request #15737 from ethereum/hotfix-langpicker
[hot-fix]: LanguagePicker menu button
2 parents 3d1bbf6 + 57fe6a1 commit d44e9e9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/components/Nav/Client/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ import { Skeleton } from "@/components/ui/skeleton"
1111

1212
import { DESKTOP_LANGUAGE_BUTTON_NAME } from "@/lib/constants"
1313

14+
import { Button } from "../../ui/buttons/Button"
1415
import { useNavigation } from "../useNavigation"
1516
import { useThemeToggle } from "../useThemeToggle"
1617

1718
import { useBreakpointValue } from "@/hooks/useBreakpointValue"
1819
import { 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-
161160
export default ClientSideNav

0 commit comments

Comments
 (0)