From abb3ace57e6d59f15c74cd86b8a52b3de748ce99 Mon Sep 17 00:00:00 2001 From: chrox Date: Tue, 3 Dec 2024 17:10:47 +0100 Subject: [PATCH] Fix import books button occasionally shown when refreshing library page --- apps/readest-app/src/app/library/page.tsx | 45 ++++++++++++----------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/apps/readest-app/src/app/library/page.tsx b/apps/readest-app/src/app/library/page.tsx index 8728e2bb..2b5a2b60 100644 --- a/apps/readest-app/src/app/library/page.tsx +++ b/apps/readest-app/src/app/library/page.tsx @@ -97,34 +97,35 @@ const LibraryPage = () => { onToggleSelectMode={handleToggleSelectMode} /> - {(loading || !libraryLoaded.current) && ( + {loading && (
)} - {libraryBooks.length > 0 ? ( -
- -
- ) : ( -
-
-
-

Your Library

-

- Welcome to your library. You can import your books here and read them anytime. -

- + {libraryLoaded.current && + (libraryBooks.length > 0 ? ( +
+ +
+ ) : ( +
+
+
+

Your Library

+

+ Welcome to your library. You can import your books here and read them anytime. +

+ +
-
- )} + ))}
); };