type SearchResultItem = { result_type: string slug: string name: string detail?: string } type SearchDropdownProps = { isOpen: boolean results: SearchResultItem[] onSelect: (type: string, slug: string) => void } export function SearchDropdown({ isOpen, results, onSelect }: SearchDropdownProps) { return (
{results.map((r) => (
onSelect(r.result_type, r.slug)} > {r.result_type} {r.name} {r.detail ? {r.detail} : null}
))}
) }