Skip to content

Commit

Permalink
Merge pull request #85 from UoaWDCC/MainGalleryFix
Browse files Browse the repository at this point in the history
editing event tiltes and description, removing autoscroll
  • Loading branch information
clen678 authored May 14, 2024
2 parents 11c352a + f0a70fe commit 7df5a36
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions web/src/components/MainGallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div className='gallery'>
Expand Down
14 changes: 7 additions & 7 deletions web/src/data/MainGalleryEvents.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
Expand Down

0 comments on commit 7df5a36

Please sign in to comment.