mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
31 lines
787 B
TypeScript
31 lines
787 B
TypeScript
import { type BreadcrumbItem, type NavItem } from '@/types';
|
|
import { ListIcon, UserIcon } from 'lucide-react';
|
|
import { ReactNode } from 'react';
|
|
import Layout from '@/layouts/app/layout';
|
|
|
|
const sidebarNavItems: NavItem[] = [
|
|
{
|
|
title: 'Profile',
|
|
href: route('profile'),
|
|
icon: UserIcon,
|
|
},
|
|
{
|
|
title: 'Projects',
|
|
href: '/',
|
|
icon: ListIcon,
|
|
},
|
|
];
|
|
|
|
export default function SettingsLayout({ children, breadcrumbs }: { children: ReactNode; breadcrumbs?: BreadcrumbItem[] }) {
|
|
// When server-side rendering, we only render the layout on the client...
|
|
if (typeof window === 'undefined') {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Layout breadcrumbs={breadcrumbs} secondNavItems={sidebarNavItems} secondNavTitle="Settings">
|
|
{children}
|
|
</Layout>
|
|
);
|
|
}
|