From 358aad06a17c52a3884e9e62b224086d61d5a3de Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Thu, 13 Feb 2025 12:56:41 +0100 Subject: [PATCH] fix(reader): safari page at left --- src/components/reader/BookReader.tsx | 59 +++++++++------------------- 1 file changed, 18 insertions(+), 41 deletions(-) diff --git a/src/components/reader/BookReader.tsx b/src/components/reader/BookReader.tsx index 494d468..0700119 100644 --- a/src/components/reader/BookReader.tsx +++ b/src/components/reader/BookReader.tsx @@ -423,7 +423,6 @@ export function BookReader({ book, pages, onClose }: BookReaderProps) { /> - {/* Bouton précédent */} {currentPage > 1 && ( )} - {/* Pages */} -
- {/* Page courante */} -
- {isLoading && ( -
- -
- )} - {!imageError ? ( - +
+ {/* Page courante */} +
+ {`Page setIsLoading(false)} - onError={() => { - setIsLoading(false); - setImageError(true); - }} + className="max-h-[calc(100vh-2rem)] w-auto object-contain" + onLoad={() => handleThumbnailLoad(currentPage)} /> - ) : ( -
- +
+ + {/* Deuxième page en mode double page */} + {isDoublePage && shouldShowDoublePage(currentPage) && ( +
+ {`Page handleThumbnailLoad(currentPage + 1)} + />
)}
- - {/* Deuxième page en mode double page */} - {shouldShowDoublePage(currentPage) && ( -
- {`Page setImageError(true)} - /> -
- )}
- {/* Bouton suivant */} {currentPage < pages.length && ( )} - {/* Bouton fermer */} {onClose && (