Fix locale switch full-page navigation
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-07 14:48:41 +01:00
parent 917be15dd5
commit f983ce2203
+2 -4
View File
@@ -1,6 +1,5 @@
"use client"; "use client";
import Link from "next/link";
import { usePathname } from "next/navigation"; import { usePathname } from "next/navigation";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
@@ -22,14 +21,13 @@ export function LocaleToggle({ locale }: LocaleToggleProps) {
<Button <Button
key={targetLocale} key={targetLocale}
asChild asChild
type="button"
variant={targetLocale === currentLocale ? "secondary" : "outline"} variant={targetLocale === currentLocale ? "secondary" : "outline"}
size="sm" size="sm"
className="text-xs" className="text-xs"
> >
<Link href={getLocalizedPath(targetLocale, currentPath)}> <a href={getLocalizedPath(targetLocale, currentPath)}>
{targetLocale.toUpperCase()} {targetLocale.toUpperCase()}
</Link> </a>
</Button> </Button>
))} ))}
</div> </div>