This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user