Files
stripstream/src/app/series/[seriesId]/SeriesContent.tsx
2026-01-04 06:19:45 +01:00

49 lines
1.3 KiB
TypeScript

"use client";
import { PaginatedBookGrid } from "@/components/series/PaginatedBookGrid";
import { SeriesHeader } from "@/components/series/SeriesHeader";
import { Container } from "@/components/ui/container";
import { useRefresh } from "@/contexts/RefreshContext";
import type { LibraryResponse } from "@/types/library";
import type { KomgaBook, KomgaSeries } from "@/types/komga";
import type { UserPreferences } from "@/types/preferences";
interface SeriesContentProps {
series: KomgaSeries;
books: LibraryResponse<KomgaBook>;
currentPage: number;
preferences: UserPreferences;
unreadOnly: boolean;
pageSize: number;
}
export function SeriesContent({
series,
books,
currentPage,
preferences,
unreadOnly,
}: SeriesContentProps) {
const { refreshSeries } = useRefresh();
return (
<>
<SeriesHeader
series={series}
refreshSeries={refreshSeries || (async () => ({ success: false }))}
/>
<Container>
<PaginatedBookGrid
books={books.content || []}
currentPage={currentPage}
totalPages={books.totalPages}
totalElements={books.totalElements}
defaultShowOnlyUnread={preferences.showOnlyUnread}
showOnlyUnread={unreadOnly}
/>
</Container>
</>
);
}