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 } from '@inertiajs/react'; import { User } from '@/types'; import { dashboard_path, logout_path, profile_edit_path } from '@/routes'; export default function Authenticated({ user, header, children }: PropsWithChildren<{ user: User, header?: ReactNode }>) { const [showingNavigationDropdown, setShowingNavigationDropdown] = useState(false); const { pathname = '' } = typeof window !== 'undefined' ? window.location : {}; return (
{header && (
{header}
)}
{children}
); }