import React from 'react' import { router, usePage } from '@inertiajs/react' import StudioLayout from '../../Layouts/StudioLayout' export default function StudioSearch() { const { props } = usePage() const search = props.search || {} const filters = search.filters || {} const sections = search.sections || [] const updateFilters = (patch) => { router.get(window.location.pathname, { ...filters, ...patch }, { preserveScroll: true, preserveState: true, replace: true, }) } return (
{filters.q ? (
Found {Number(search.summary?.total || 0).toLocaleString()} matches for {search.summary?.query}
{sections.length > 0 ? sections.map((section) => (

{section.label}

{section.count} matches
{section.items.map((item) =>
{item.title}
{item.subtitle}

{item.description}

)}
)) :
No results matched this search yet.
}
) : (

Continue working

{(search.empty_state?.continue_working || []).map((item) =>
{item.title}
{item.module_label} ยท {item.workflow?.readiness?.label}
)}
)}
) }