This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
@@ -22,14 +21,13 @@ export function LocaleToggle({ locale }: LocaleToggleProps) {
|
||||
<Button
|
||||
key={targetLocale}
|
||||
asChild
|
||||
type="button"
|
||||
variant={targetLocale === currentLocale ? "secondary" : "outline"}
|
||||
size="sm"
|
||||
className="text-xs"
|
||||
>
|
||||
<Link href={getLocalizedPath(targetLocale, currentPath)}>
|
||||
<a href={getLocalizedPath(targetLocale, currentPath)}>
|
||||
{targetLocale.toUpperCase()}
|
||||
</Link>
|
||||
</a>
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user