stubs/inertia-react-ts/app/javascript/Layouts/AuthenticatedLayout.tsx in kaze-0.15.0 vs stubs/inertia-react-ts/app/javascript/Layouts/AuthenticatedLayout.tsx in kaze-0.16.0

- old
+ new

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