Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-17 00:51:25 +00:00
co-authored by renee-png
parent 255d39a2d7
commit 4715dcc4f7
2 changed files with 80 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
import { createFileRoute, Link, useLocation } from "@tanstack/react-router";
import { ProtectedLayout } from "@/components/protected-layout";
import { PageContainer, PageHeader } from "@/components/app-shell";
import { Outlet } from "@tanstack/react-router";
import { cn } from "@/lib/utils";
export const Route = createFileRoute("/settings")({
component: SettingsLayout,
});
const TABS = [
{ to: "/settings", label: "Company", exact: true },
{ to: "/settings/fees", label: "Fee schedule" },
];
function SettingsLayout() {
const location = useLocation();
return (
<ProtectedLayout adminOnly>
<PageContainer>
<PageHeader
title="Settings"
description="Configure firm-wide information and billing defaults."
/>
<div className="flex gap-1 border-b mb-6">
{TABS.map((t) => {
const active = t.exact
? location.pathname === t.to
: location.pathname.startsWith(t.to);
return (
<Link
key={t.to}
to={t.to}
className={cn(
"px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors",
active
? "border-primary text-foreground"
: "border-transparent text-muted-foreground hover:text-foreground",
)}
>
{t.label}
</Link>
);
})}
</div>
<Outlet />
</PageContainer>
</ProtectedLayout>
);
}