diff --git a/src/components/Charts/ImageGallerySkeleton.jsx b/src/components/Charts/ImageGallerySkeleton.jsx new file mode 100644 index 00000000..a3f871d9 --- /dev/null +++ b/src/components/Charts/ImageGallerySkeleton.jsx @@ -0,0 +1,46 @@ +import React from "react"; + +const ImageCardSkeleton = ({ count = 1 }) => { + const cards = Array.from({ length: count }); + + return ( +
+ {cards.map((_, idx) => ( +
+
+
+
+
+
+ +
+ + + +
+
+ +
+ +
+
+ +
+
+ +
+
+
+
+ ))} +
+ ); +}; + +export default ImageCardSkeleton; diff --git a/src/pages/ImageGallery/ImageGalleryPage.jsx b/src/pages/ImageGallery/ImageGalleryPage.jsx index 70a9d37d..c1d52bbe 100644 --- a/src/pages/ImageGallery/ImageGalleryPage.jsx +++ b/src/pages/ImageGallery/ImageGalleryPage.jsx @@ -12,6 +12,7 @@ import ImageGalleryListView from "../../components/ImageGallery/ImageGalleryList import ImageGalleryFilters from "../../components/ImageGallery/ImageGalleryFilters"; import "../../components/ImageGallery/ImageGallery.css"; import { useFab } from "../../Context/FabContext"; +import ImageGallerySkeleton from "../../components/Charts/ImageGallerySkeleton"; const ImageGalleryPage = () => { const dispatch = useDispatch(); @@ -246,16 +247,21 @@ const ImageGalleryPage = () => { )} - + {isLoading ? ( + + ) : ( + + )} +
); };