From 80edeaf340350aec9c8e91b1c5a6e495f0229393 Mon Sep 17 00:00:00 2001 From: ct-chu <34020696+ct-chu@users.noreply.github.com> Date: Wed, 14 Feb 2024 15:30:02 +0800 Subject: [PATCH] reverse chronological order for photos --- src/pages/mediaProduction/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/mediaProduction/index.js b/src/pages/mediaProduction/index.js index 0feac4b..01513cc 100644 --- a/src/pages/mediaProduction/index.js +++ b/src/pages/mediaProduction/index.js @@ -109,7 +109,8 @@ const Tabs = () => { const [slides, setSlides] = useState([]); useEffect(() => { if (graphInfo.loaded) { - const dataGraphics = graphInfo.data.photoset.photo.map(createPhotoArray); + let dataGraphics = graphInfo.data.photoset.photo.map(createPhotoArray); + dataGraphics = dataPhoto.reverse(); setSlides(dataGraphics); // console.log("slides"); // console.log(slides);