MCPcopy Index your code
hub / github.com/github/docs / SearchResultHits

Function SearchResultHits

components/search/SearchResults.tsx:40–57  ·  view source on GitHub ↗
({ hits, query }: { hits: SearchResultHitT[]; query: string })

Source from the content-addressed store, hash-verified

38}
39
40function 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
59function NoSearchResults() {
60 const { t } = useTranslation('search')

Callers

nothing calls this directly

Calls 1

useQueryFunction · 0.90

Tested by

no test coverage detected