import { Link } from '@inertiajs/react'; import { type PropsWithChildren } from 'react'; import { Heading } from '@/common/Heading'; import { cn } from '@/common/helpers/cn'; import { type NavItem } from '@/common/types'; import { appearance } from '@/routes'; import { edit as editPassword } from '@/routes/password'; import { edit } from '@/routes/profile'; import { Button } from '@/shadcn/button'; import { Separator } from '@/shadcn/separator'; const sidebarNavItems: NavItem[] = [ { title: 'Profile', href: edit(), icon: null, }, { title: 'Password', href: editPassword(), icon: null, }, { title: 'Appearance', href: appearance(), icon: null, }, ]; export default function SettingsLayout({ children }: PropsWithChildren) { // When server-side rendering, we only render the layout on the client... if (typeof window === 'undefined') { return null; } const currentPath = window.location.pathname; return (
{children}
); }