fix : await on params for page reader
This commit is contained in:
@@ -10,8 +10,9 @@ import { AppError } from "@/utils/errors";
|
|||||||
|
|
||||||
async function BookPage({ params }: { params: { bookId: string } }) {
|
async function BookPage({ params }: { params: { bookId: string } }) {
|
||||||
try {
|
try {
|
||||||
const data: KomgaBookWithPages = await BookService.getBook(params.bookId);
|
const { bookId } = await params;
|
||||||
const nextBook = await BookService.getNextBook(params.bookId, data.book.seriesId);
|
const data: KomgaBookWithPages = await BookService.getBook(bookId);
|
||||||
|
const nextBook = await BookService.getNextBook(bookId, data.book.seriesId);
|
||||||
return (
|
return (
|
||||||
<Suspense fallback={<BookSkeleton />}>
|
<Suspense fallback={<BookSkeleton />}>
|
||||||
<ClientBookWrapper book={data.book} pages={data.pages} nextBook={nextBook} />
|
<ClientBookWrapper book={data.book} pages={data.pages} nextBook={nextBook} />
|
||||||
|
|||||||
Reference in New Issue
Block a user