From f0a70fea08726a767fbbaee31a7fc919de7a9d01 Mon Sep 17 00:00:00 2001 From: clen678 Date: Tue, 14 May 2024 12:46:14 +1200 Subject: [PATCH] editing event tiltes and description, removing autoscroll --- web/src/components/MainGallery.tsx | 16 ++++++++-------- web/src/data/MainGalleryEvents.json | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/web/src/components/MainGallery.tsx b/web/src/components/MainGallery.tsx index a703747..6200b7d 100644 --- a/web/src/components/MainGallery.tsx +++ b/web/src/components/MainGallery.tsx @@ -30,15 +30,15 @@ const MainGallery = ({ data }: MainGalleryProps) => { setEventIndex((prevIndex) => (prevIndex === data.length - 1 ? 0 : prevIndex + 1)) } - // function to autoscroll the images, ?MIGHT REMOVE THIS LATER? - useEffect(() => { - const interval = setInterval(() => { - setEventIndex((prevIndex) => (prevIndex === data.length - 1 ? 0 : prevIndex + 1)) - }, 5000) + // // function to autoscroll the images, ?MIGHT REMOVE THIS LATER? + // useEffect(() => { + // const interval = setInterval(() => { + // setEventIndex((prevIndex) => (prevIndex === data.length - 1 ? 0 : prevIndex + 1)) + // }, 5000) - // return a cleanup function to clear the interval when the component unmounts - return () => clearInterval(interval) - }, [data.length]) + // // return a cleanup function to clear the interval when the component unmounts + // return () => clearInterval(interval) + // }, [data.length]) return (
diff --git a/web/src/data/MainGalleryEvents.json b/web/src/data/MainGalleryEvents.json index 942f614..34ed800 100644 --- a/web/src/data/MainGalleryEvents.json +++ b/web/src/data/MainGalleryEvents.json @@ -4,31 +4,31 @@ "id": 1, "imageSrc": "/public/assets/gallery/events/sample1.png", "title": "Pink Ribbon Breakfast", - "description": "Qwoijhdoiasjiodoqwidihqoiasdqwdq", + "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.", "alt": "Event 1" }, { "id": 2, "imageSrc": "/public/assets/gallery/events/sample2.png", - "title": "Dbink RDibbon BDreakfast", - "description": "Description 2 ascas q2wq dwq qwd", + "title": "Volunteers Day", + "description": "Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it", "alt": "Event 2" }, { "id": 3, "imageSrc": "/public/assets/gallery/events/sample3.png", - "title": "Qwbink RDibboqwen BDreakfeqast", - "description": "Descriptiwqeq112on 3", + "title": "Blue Ribbon Breakfast", + "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", "alt": "Event 3" }, { "id": 4, "imageSrc": "/public/assets/gallery/events/sample4.png", - "title": "QwdwdwdwdRDibboqwen BDreakfeqast", - "description": "Descriptiwqeq112on 3scriptiwqeq112on 3scriptiw qeq112on 3scriptiw qeq112on 3scr iptiwq eq112on 3scripti wqeq112on 3script iwqeq1 12on 3", + "title": "Volunteers Week", + "description": "Loren ipsom volunteer at your next local vendor today!", "alt": "Event 4" } ]