({ hits, query }: { hits: SearchResultHitT[]; query: string })
| 38 | } |
| 39 | |
| 40 | function SearchResultHits({ hits, query }: { hits: SearchResultHitT[]; query: string }) { |
| 41 | const { debug } = useQuery() |
| 42 | return ( |
| 43 | <div> |
| 44 | {hits.length === 0 && <NoSearchResults />} |
| 45 | {hits.map((hit, index) => ( |
| 46 | <SearchResultHit |
| 47 | key={hit.id} |
| 48 | hit={hit} |
| 49 | query={query} |
| 50 | totalHits={hits.length} |
| 51 | index={index} |
| 52 | debug={debug} |
| 53 | /> |
| 54 | ))} |
| 55 | </div> |
| 56 | ) |
| 57 | } |
| 58 | |
| 59 | function NoSearchResults() { |
| 60 | const { t } = useTranslation('search') |
nothing calls this directly
no test coverage detected