// * REACT/INERTIA import { Head as InertiaHead, usePage } from "@inertiajs/react"; import logoImg from "&/images/global/logo.svg"; interface BreadcrumbItem { title: string; url: string; } interface HeadProps { title?: string; description?: string; } interface Ziggy { location: string; } export default function Head({ title, description }: HeadProps) { const appEnv = usePage().props.appEnv as AppEnv; const { breadcrumbs } = usePage().props as { breadcrumbs?: BreadcrumbItem[]; }; const { location } = usePage().props.ziggy as Ziggy; const canonical = location.replace("index.php/", "").replace("index.php", ""); return ( {title} {description && ( <> )} {title && } {description && } {breadcrumbs && breadcrumbs.length > 0 && ( )} ); }