feat(backoffice): add page preview carousel on book detail page

Shows 5 pages at a time in a full-width grid with prev/next navigation.
Pages are fetched via the existing proxy route with webp format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 22:18:47 +01:00
parent cfc896e92f
commit 473e849dfa
2 changed files with 67 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import { fetchLibraries, getBookCoverUrl, BookDto, apiFetch } from "../../../lib/api";
import { BookPreview } from "../../components/BookPreview";
import Image from "next/image";
import Link from "next/link";
import { notFound } from "next/navigation";
@@ -157,6 +158,12 @@ export default async function BookDetailPage({
</div>
</div>
</div>
{book.page_count && book.page_count > 0 && (
<div className="mt-8">
<BookPreview bookId={book.id} pageCount={book.page_count} />
</div>
)}
</>
);
}