/** * BookList component — displays search results with click-to-detail navigation. */ import type { BookSummary } from "../types"; import { READING_STATUS_LABELS } from "../types"; interface BookListProps { books: BookSummary[]; isLoading: boolean; totalCount: number; onBookClick: (id: number) => void; } function StatusBadge({ status }: { status: BookSummary["reading_status"] }) { const className = `status-badge status-${status}`; return {READING_STATUS_LABELS[status]}; } function EmptyState() { return (

No books found

Try adjusting your search query or filters to find what you're looking for.

); } function LoadingSpinner() { return (

Searching books...

); } export default function BookList({ books, isLoading, totalCount, onBookClick, }: BookListProps) { if (isLoading) return ; if (totalCount === 0) return ; return (

{totalCount} book{totalCount !== 1 ? "s" : ""} found

{books.map((book) => ( ))}
); }