import { useState, PropsWithChildren, ReactNode } from 'react' import ApplicationLogo from '@/Components/ApplicationLogo' import Dropdown from '@/Components/Dropdown' import NavLink from '@/Components/NavLink' import ResponsiveNavLink from '@/Components/ResponsiveNavLink' import { Link, usePage } from '@inertiajs/react' import { dashboard_path, logout_path, profile_edit_path } from '@/routes' export default function AuthenticatedLayout({ header, children, }: PropsWithChildren<{ header?: ReactNode }>) { const user = usePage().props.auth.user const [showingNavigationDropdown, setShowingNavigationDropdown] = useState(false) const { pathname = '' } = typeof window !== 'undefined' ? window.location : {} return (
{header && (
{header}
)}
{children}
) }