import Link from 'next/link'; import { apiFetch } from '../_lib/api'; interface MeiliHit { id: string; content: string; senderName: string; sourceGroupName: string; tags: string[]; approvedAt: number; } interface SearchResponse { hits: MeiliHit[]; total: number; page: number; limit: number; query: string; } export function SearchResults({ hits, total, q, page, }: { hits: MeiliHit[]; total: number; q: string; page: number; }) { return (
No results{q ? ` for "${q}"` : ''}.
) : ( <>{total} result{total !== 1 ? 's' : ''}
{hit.content}