From 470391601d815b558ff64fe9f637e5930ec22211 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Fri, 17 Oct 2025 11:16:22 +0200 Subject: [PATCH] feat: add loading skeleton components for Library and Series pages to enhance user experience during data fetching --- src/app/libraries/[libraryId]/loading.tsx | 46 +++++++++++++++++++ src/app/series/[seriesId]/loading.tsx | 56 +++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 src/app/libraries/[libraryId]/loading.tsx create mode 100644 src/app/series/[seriesId]/loading.tsx diff --git a/src/app/libraries/[libraryId]/loading.tsx b/src/app/libraries/[libraryId]/loading.tsx new file mode 100644 index 0000000..949662a --- /dev/null +++ b/src/app/libraries/[libraryId]/loading.tsx @@ -0,0 +1,46 @@ +import { OptimizedSkeleton } from "@/components/skeletons/OptimizedSkeletons"; + +export default function LibraryLoading() { + return ( +
+ {/* Header avec titre + compteur + refresh */} +
+ +
+ + +
+
+ + {/* Filters section */} +
+
+
+
+ +
+
+ + + +
+
+
+ + {/* Grid */} +
+ {Array.from({ length: 20 }).map((_, i) => ( + + ))} +
+ + {/* Pagination */} +
+ + +
+
+
+ ); +} + diff --git a/src/app/series/[seriesId]/loading.tsx b/src/app/series/[seriesId]/loading.tsx new file mode 100644 index 0000000..ad76577 --- /dev/null +++ b/src/app/series/[seriesId]/loading.tsx @@ -0,0 +1,56 @@ +import { OptimizedSkeleton } from "@/components/skeletons/OptimizedSkeletons"; + +export default function SeriesLoading() { + return ( +
+ {/* Series Header */} +
+
+
+ {/* Cover */} + + + {/* Info */} +
+ + +
+ + + + +
+
+
+
+
+ + {/* Books Grid */} +
+ {/* Filters */} +
+ +
+ + + +
+
+ + {/* Grid */} +
+ {Array.from({ length: 20 }).map((_, i) => ( + + ))} +
+ + {/* Pagination */} +
+ + +
+
+
+ ); +} +