style: clean up code with prettier and eslint
This commit is contained in:
1 parent
60278b9e71
commit
fb8e77bb68
378 files changed
+22407
-20689
No files matched your search
@@ -1,40 +1,40 @@
|
||||
'use client'
|
||||
"use client";
|
||||
|
||||
import { Gamepad2, Globe, Server } from 'lucide-react'
|
||||
import Link from 'next/link'
|
||||
import { usePathname } from 'next/navigation'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { Gamepad2, Globe, Server } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const TABS = [
|
||||
{ href: '/admin/translations/cms', label: 'CMS', icon: Globe },
|
||||
{ href: '/admin/translations/client', label: 'Client (Nitro)', icon: Gamepad2 },
|
||||
{ href: '/admin/translations/emulator', label: 'Emulator', icon: Server },
|
||||
] as const
|
||||
{ href: "/admin/translations/cms", label: "CMS", icon: Globe },
|
||||
{ href: "/admin/translations/client", label: "Client (Nitro)", icon: Gamepad2 },
|
||||
{ href: "/admin/translations/emulator", label: "Emulator", icon: Server },
|
||||
] as const;
|
||||
|
||||
export function TranslationsTabs() {
|
||||
const pathname = usePathname()
|
||||
const pathname = usePathname();
|
||||
|
||||
return (
|
||||
<div className="flex gap-1 border-b">
|
||||
{TABS.map((t) => {
|
||||
const active = pathname === t.href || pathname.startsWith(`${t.href}/`)
|
||||
const Icon = t.icon
|
||||
const active = pathname === t.href || pathname.startsWith(`${t.href}/`);
|
||||
const Icon = t.icon;
|
||||
return (
|
||||
<Link
|
||||
key={t.href}
|
||||
href={t.href}
|
||||
className={cn(
|
||||
'-mb-px flex items-center gap-2 border-b-2 px-4 py-2 text-sm font-medium transition-colors',
|
||||
"-mb-px flex items-center gap-2 border-b-2 px-4 py-2 text-sm font-medium transition-colors",
|
||||
active
|
||||
? 'border-primary text-foreground'
|
||||
: 'border-transparent text-muted-foreground hover:text-foreground',
|
||||
? "border-primary text-foreground"
|
||||
: "border-transparent text-muted-foreground hover:text-foreground",
|
||||
)}
|
||||
>
|
||||
<Icon className="h-4 w-4" />
|
||||
{t.label}
|
||||
</Link>
|
||||
)
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user