suna/frontend/src/app/(dashboard)/(personalAccount)/settings/layout.tsx

41 lines
1.8 KiB
TypeScript
Raw Normal View History

2025-04-16 13:41:55 +08:00
'use client';
2025-04-12 02:57:17 +08:00
import {Separator} from "@/components/ui/separator";
2025-04-16 04:45:46 +08:00
import Link from "next/link";
import { usePathname } from "next/navigation";
2025-04-12 02:57:17 +08:00
export default function PersonalAccountSettingsPage({children}: {children: React.ReactNode}) {
2025-04-16 04:45:46 +08:00
const pathname = usePathname();
2025-04-12 02:57:17 +08:00
const items = [
2025-04-24 12:30:08 +08:00
// { name: "Profile", href: "/settings" },
// { name: "Teams", href: "/settings/teams" },
2025-04-21 12:49:18 +08:00
{ name: "Billing", href: "/settings/billing" },
2025-04-12 02:57:17 +08:00
]
return (
<div className="space-y-6 w-full">
<Separator className="border-subtle dark:border-white/10" />
<div className="flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0 w-full max-w-6xl mx-auto px-4">
<aside className="lg:w-1/4 p-1">
2025-04-16 04:45:46 +08:00
<nav className="flex flex-col space-y-1">
{items.map((item) => (
<Link
key={item.href}
href={item.href}
className={`px-3 py-2 rounded-md text-sm font-medium transition-colors ${
pathname === item.href
? "bg-accent text-accent-foreground"
: "text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"
}`}
>
{item.name}
</Link>
))}
</nav>
2025-04-12 02:57:17 +08:00
</aside>
<div className="flex-1 bg-card-bg dark:bg-background-secondary p-6 rounded-2xl border border-subtle dark:border-white/10 shadow-custom">
{children}
</div>
</div>
</div>
)
}