import Heading from '@/components/heading'; import { Button } from '@/components/ui/button'; import { Separator } from '@/components/ui/separator'; import { cn } from '@/lib/utils'; import { edit as editAppearance } from '@/routes/appearance'; import { edit as editPassword } from '@/routes/password'; import { edit } from '@/routes/profile'; import { show } from '@/routes/two-factor'; import { type NavItem } from '@/types'; import { Link } from '@inertiajs/react'; import { type PropsWithChildren } from 'react'; const sidebarNavItems: NavItem[] = [ { title: 'Profile', href: edit(), icon: null, }, { title: 'Password', href: editPassword(), icon: null, }, { title: 'Two-Factor Auth', href: show(), icon: null, }, { title: 'Appearance', href: editAppearance(), 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 (