sourcebot/packages/web/src/app/[domain]/settings/layout.tsx

49 lines
1.5 KiB
TypeScript
Raw Normal View History

2025-02-12 22:55:35 +00:00
import { Metadata } from "next"
import { SidebarNav } from "./components/sidebar-nav"
import { NavigationMenu } from "../components/navigationMenu"
import { Header } from "./components/header";
2025-02-12 22:55:35 +00:00
export const metadata: Metadata = {
title: "Settings",
}
export default function SettingsLayout({
2025-01-23 18:26:41 +00:00
children,
2025-02-12 21:05:44 +00:00
params: { domain },
2025-01-23 18:26:41 +00:00
}: Readonly<{
children: React.ReactNode;
2025-02-12 21:05:44 +00:00
params: { domain: string };
2025-01-23 18:26:41 +00:00
}>) {
2025-02-12 22:55:35 +00:00
const sidebarNavItems = [
{
title: "General",
2025-02-12 22:55:35 +00:00
href: `/${domain}/settings`,
},
{
title: "Billing",
href: `/${domain}/settings/billing`,
},
{
title: "Members",
href: `/${domain}/settings/members`,
2025-02-12 22:55:35 +00:00
}
]
2025-01-23 18:26:41 +00:00
return (
<div className="min-h-screen flex flex-col">
2025-02-12 21:05:44 +00:00
<NavigationMenu domain={domain} />
<div className="flex-grow flex justify-center p-4 bg-[#fafafa] dark:bg-background relative">
<div className="w-full max-w-6xl">
<Header className="w-full">
<h1 className="text-3xl">Settings</h1>
</Header>
<div className="flex flex-row gap-10 mt-20">
<aside className="lg:w-48">
<SidebarNav items={sidebarNavItems} />
</aside>
<div className="w-full rounded-lg">{children}</div>
</div>
2025-02-12 22:55:35 +00:00
</div>
</div>
2025-02-13 18:15:06 +00:00
</div>
2025-01-23 18:26:41 +00:00
)
}