refacto: tentative de refacto

This commit is contained in:
Julien Froidefond
2025-02-17 16:37:48 +01:00
parent 7ee99ac31a
commit ba725bb1a3
28 changed files with 195 additions and 170 deletions

View File

@@ -16,7 +16,8 @@ export const useThumbnails = ({ book, currentPage }: UseThumbnailsProps) => {
const getThumbnailUrl = useCallback(
(pageNumber: number) => {
return `/api/komga/images/books/${book.id}/pages/${pageNumber}/thumbnail`;
const zeroBasedPage = pageNumber - 1;
return `/api/komga/images/books/${book.id}/pages/${zeroBasedPage}/thumbnail?zero_based=true`;
},
[book.id]
);