feat: nextbook on next page if last page

This commit is contained in:
Julien Froidefond
2025-03-07 08:15:34 +01:00
parent 591a41149f
commit 66f467c66b
8 changed files with 66 additions and 10 deletions

View File

@@ -11,10 +11,10 @@ import { AppError } from "@/utils/errors";
async function BookPage({ params }: { params: { bookId: string } }) {
try {
const data: KomgaBookWithPages = await BookService.getBook(params.bookId);
const nextBook = await BookService.getNextBook(params.bookId, data.book.seriesId);
return (
<Suspense fallback={<BookSkeleton />}>
<ClientBookWrapper book={data.book} pages={data.pages} />
<ClientBookWrapper book={data.book} pages={data.pages} nextBook={nextBook} />
</Suspense>
);
} catch (error) {