Skip to content

Commit 6f5018a

Browse files
committed
Replace gallery library
1 parent 6ee8463 commit 6f5018a

File tree

4 files changed

+145
-26
lines changed

4 files changed

+145
-26
lines changed

Diff for: frontend/package-lock.json

+18-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: frontend/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"postcss": "8.4.29",
2626
"react": "18.2.0",
2727
"react-dom": "18.2.0",
28-
"react-grid-gallery": "^1.0.1",
2928
"react-multi-carousel": "^2.8.5",
29+
"react-photo-album": "^3.0.2",
3030
"tailwindcss": "3.3.3",
3131
"typescript": "5.1"
3232
},

Diff for: frontend/public/data/events.ts

+108
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,114 @@ export const events: eventInfo[] = [
4949
];
5050

5151
export const previousEvents: eventInfo[] = [
52+
{
53+
title: 'COMP1521 Revision Session',
54+
startTime: 'Wednesday, 31 July 2024 16:00:00',
55+
endTime: 'Wednesday, 31 July 2024 18:00:00',
56+
location: 'UNSW Colombo Theatre B',
57+
description: 'PSST 🤫 Think a pipe is what Mario goes down? ⬇️ Still think threads are for clothes? 🪡 Whether you’re seven weeks behind (😣) on lectures 👩‍🏫, or super on top of it (🤯), get ready to BYTE 👾 into a world of MIPS and files and numbers 📣 at our COMP1521 Revision Session to learn and/or reinforce your knowledge from the beginning to the end 🏁💪🏻🧠 Make no MIPStake, with bits of free food for you to byte into 🤤 our 1521 Revision Session is just for you ‼️',
58+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/452409402_989988656244079_1650487011875279290_n.jpg?stp=dst-jpg_s960x960&_nc_cat=111&ccb=1-7&_nc_sid=75d36f&_nc_ohc=ht74Cur7JP4Q7kNvgGspvAQ&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=APUh-KsjJ_dRpSnbr0TYkXd&oh=00_AYAu-LeWj1k53uhaQe6BMnCdQiDRUmguc0R4gt93VnxsRA&oe=6713A488',
59+
link: 'https://www.facebook.com/events/1911189126010096',
60+
},
61+
{
62+
title: 'IMC Coding Competition',
63+
startTime: 'Wednesday, 13 March 2024 15:00:00',
64+
endTime: 'Wednesday, 13 March 2024 18:00:00',
65+
location: 'Mathews Theatre B, UNSW',
66+
description: 'Get those fingers 👐moving, as you’ll need to team up in groups of 3️⃣to be able to face 🗣️some of the problems thrown your way.To reward your diligence, you’ll be able to grab a free BYTE as finger food is provided 😈 Gaining coding experience and free food, what else could someone even ask for??? 😣',
67+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/429779953_899425045300441_8341318489109234227_n.jpg?stp=dst-jpg_s960x960&_nc_cat=108&ccb=1-7&_nc_sid=75d36f&_nc_ohc=GY9LwEPT93gQ7kNvgHltEQe&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=APnYFltr29MYoFJQyVlY7HF&oh=00_AYBAaye3BXFt34mnbEi4ERpy1XmUYCTEbpzSqL1xa_xLsA&oe=6713AF65',
68+
link: 'https://www.facebook.com/events/1106870833796065',
69+
},
70+
{
71+
title: 'Cultural BBQ',
72+
startTime: 'Wednesday, 17 July 2024 12:00:00',
73+
endTime: 'Wednesday, 17 July 2024 14:00:00',
74+
location: 'Globe Lawn',
75+
description: 'Tired of eating the same food every week? 😔 Looking to expand your horizons and try some cultural food? 🥘 BROKE AND NEED SOMETHING TO EAT ⁉️⁉️ Well CSESoc has you covered with an upgrade to our weekly bbq🍖🌟',
76+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/450318124_983296013580010_564345365632281594_n.jpg?stp=dst-jpg_s960x960&_nc_cat=109&ccb=1-7&_nc_sid=75d36f&_nc_ohc=bpVcbawdlHUQ7kNvgFOoHVZ&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=AHXSpjSIF8pprA1p1Ogqi34&oh=00_AYD1_PrwM7LTFVCvhXIQ3kubwhhYkBOmIO49Gpy4bvTdEg&oe=67139777',
77+
link: 'https://www.facebook.com/events/871196261705246',
78+
},
79+
{
80+
title: 'CSESOC Boardgames Night',
81+
startTime: 'Thursday, 7 March 2024 17:00:00',
82+
endTime: 'Thursday, 7 March 2024 19:00:00',
83+
location: 'Design Next Studio, Level 5, J17, UNSW',
84+
description: 'The whirlwind of uni got u overwhelmed 😣? Come down to the Design Studio, and chill out with us 🧘‍♀️ as we play board games and indulge in free pizza 🍕!',
85+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/429667295_896623802247232_669736057716718914_n.jpg?stp=dst-jpg_s960x960&_nc_cat=102&ccb=1-7&_nc_sid=75d36f&_nc_ohc=Ayn7Skl-pFAQ7kNvgES7wuB&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=AsnAjGmOe-G8q1L6qZb9G3U&oh=00_AYDpfvDY6DpKeydN99VCHujemmm0gZwL7_O1HjXHvwiPsw&oe=671383B1',
86+
link: 'https://www.facebook.com/events/322704110303236',
87+
},
88+
{
89+
title: 'COMP1521 Revision Session',
90+
startTime: 'Wednesday, 31 July 2024 16:00:00',
91+
endTime: 'Wednesday, 31 July 2024 18:00:00',
92+
location: 'UNSW Colombo Theatre B',
93+
description: 'PSST 🤫 Think a pipe is what Mario goes down? ⬇️ Still think threads are for clothes? 🪡 Whether you’re seven weeks behind (😣) on lectures 👩‍🏫, or super on top of it (🤯), get ready to BYTE 👾 into a world of MIPS and files and numbers 📣 at our COMP1521 Revision Session to learn and/or reinforce your knowledge from the beginning to the end 🏁💪🏻🧠 Make no MIPStake, with bits of free food for you to byte into 🤤 our 1521 Revision Session is just for you ‼️',
94+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/452409402_989988656244079_1650487011875279290_n.jpg?stp=dst-jpg_s960x960&_nc_cat=111&ccb=1-7&_nc_sid=75d36f&_nc_ohc=ht74Cur7JP4Q7kNvgGspvAQ&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=APUh-KsjJ_dRpSnbr0TYkXd&oh=00_AYAu-LeWj1k53uhaQe6BMnCdQiDRUmguc0R4gt93VnxsRA&oe=6713A488',
95+
link: 'https://www.facebook.com/events/1911189126010096',
96+
},
97+
{
98+
title: 'IMC Coding Competition',
99+
startTime: 'Wednesday, 13 March 2024 15:00:00',
100+
endTime: 'Wednesday, 13 March 2024 18:00:00',
101+
location: 'Mathews Theatre B, UNSW',
102+
description: 'Get those fingers 👐moving, as you’ll need to team up in groups of 3️⃣to be able to face 🗣️some of the problems thrown your way.To reward your diligence, you’ll be able to grab a free BYTE as finger food is provided 😈 Gaining coding experience and free food, what else could someone even ask for??? 😣',
103+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/429779953_899425045300441_8341318489109234227_n.jpg?stp=dst-jpg_s960x960&_nc_cat=108&ccb=1-7&_nc_sid=75d36f&_nc_ohc=GY9LwEPT93gQ7kNvgHltEQe&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=APnYFltr29MYoFJQyVlY7HF&oh=00_AYBAaye3BXFt34mnbEi4ERpy1XmUYCTEbpzSqL1xa_xLsA&oe=6713AF65',
104+
link: 'https://www.facebook.com/events/1106870833796065',
105+
},
106+
{
107+
title: 'Cultural BBQ',
108+
startTime: 'Wednesday, 17 July 2024 12:00:00',
109+
endTime: 'Wednesday, 17 July 2024 14:00:00',
110+
location: 'Globe Lawn',
111+
description: 'Tired of eating the same food every week? 😔 Looking to expand your horizons and try some cultural food? 🥘 BROKE AND NEED SOMETHING TO EAT ⁉️⁉️ Well CSESoc has you covered with an upgrade to our weekly bbq🍖🌟',
112+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/450318124_983296013580010_564345365632281594_n.jpg?stp=dst-jpg_s960x960&_nc_cat=109&ccb=1-7&_nc_sid=75d36f&_nc_ohc=bpVcbawdlHUQ7kNvgFOoHVZ&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=AHXSpjSIF8pprA1p1Ogqi34&oh=00_AYD1_PrwM7LTFVCvhXIQ3kubwhhYkBOmIO49Gpy4bvTdEg&oe=67139777',
113+
link: 'https://www.facebook.com/events/871196261705246',
114+
},
115+
{
116+
title: 'CSESOC Boardgames Night',
117+
startTime: 'Thursday, 7 March 2024 17:00:00',
118+
endTime: 'Thursday, 7 March 2024 19:00:00',
119+
location: 'Design Next Studio, Level 5, J17, UNSW',
120+
description: 'The whirlwind of uni got u overwhelmed 😣? Come down to the Design Studio, and chill out with us 🧘‍♀️ as we play board games and indulge in free pizza 🍕!',
121+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/429667295_896623802247232_669736057716718914_n.jpg?stp=dst-jpg_s960x960&_nc_cat=102&ccb=1-7&_nc_sid=75d36f&_nc_ohc=Ayn7Skl-pFAQ7kNvgES7wuB&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=AsnAjGmOe-G8q1L6qZb9G3U&oh=00_AYDpfvDY6DpKeydN99VCHujemmm0gZwL7_O1HjXHvwiPsw&oe=671383B1',
122+
link: 'https://www.facebook.com/events/322704110303236',
123+
},
124+
{
125+
title: 'COMP1521 Revision Session',
126+
startTime: 'Wednesday, 31 July 2024 16:00:00',
127+
endTime: 'Wednesday, 31 July 2024 18:00:00',
128+
location: 'UNSW Colombo Theatre B',
129+
description: 'PSST 🤫 Think a pipe is what Mario goes down? ⬇️ Still think threads are for clothes? 🪡 Whether you’re seven weeks behind (😣) on lectures 👩‍🏫, or super on top of it (🤯), get ready to BYTE 👾 into a world of MIPS and files and numbers 📣 at our COMP1521 Revision Session to learn and/or reinforce your knowledge from the beginning to the end 🏁💪🏻🧠 Make no MIPStake, with bits of free food for you to byte into 🤤 our 1521 Revision Session is just for you ‼️',
130+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/452409402_989988656244079_1650487011875279290_n.jpg?stp=dst-jpg_s960x960&_nc_cat=111&ccb=1-7&_nc_sid=75d36f&_nc_ohc=ht74Cur7JP4Q7kNvgGspvAQ&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=APUh-KsjJ_dRpSnbr0TYkXd&oh=00_AYAu-LeWj1k53uhaQe6BMnCdQiDRUmguc0R4gt93VnxsRA&oe=6713A488',
131+
link: 'https://www.facebook.com/events/1911189126010096',
132+
},
133+
{
134+
title: 'IMC Coding Competition',
135+
startTime: 'Wednesday, 13 March 2024 15:00:00',
136+
endTime: 'Wednesday, 13 March 2024 18:00:00',
137+
location: 'Mathews Theatre B, UNSW',
138+
description: 'Get those fingers 👐moving, as you’ll need to team up in groups of 3️⃣to be able to face 🗣️some of the problems thrown your way.To reward your diligence, you’ll be able to grab a free BYTE as finger food is provided 😈 Gaining coding experience and free food, what else could someone even ask for??? 😣',
139+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/429779953_899425045300441_8341318489109234227_n.jpg?stp=dst-jpg_s960x960&_nc_cat=108&ccb=1-7&_nc_sid=75d36f&_nc_ohc=GY9LwEPT93gQ7kNvgHltEQe&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=APnYFltr29MYoFJQyVlY7HF&oh=00_AYBAaye3BXFt34mnbEi4ERpy1XmUYCTEbpzSqL1xa_xLsA&oe=6713AF65',
140+
link: 'https://www.facebook.com/events/1106870833796065',
141+
},
142+
{
143+
title: 'Cultural BBQ',
144+
startTime: 'Wednesday, 17 July 2024 12:00:00',
145+
endTime: 'Wednesday, 17 July 2024 14:00:00',
146+
location: 'Globe Lawn',
147+
description: 'Tired of eating the same food every week? 😔 Looking to expand your horizons and try some cultural food? 🥘 BROKE AND NEED SOMETHING TO EAT ⁉️⁉️ Well CSESoc has you covered with an upgrade to our weekly bbq🍖🌟',
148+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/450318124_983296013580010_564345365632281594_n.jpg?stp=dst-jpg_s960x960&_nc_cat=109&ccb=1-7&_nc_sid=75d36f&_nc_ohc=bpVcbawdlHUQ7kNvgFOoHVZ&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=AHXSpjSIF8pprA1p1Ogqi34&oh=00_AYD1_PrwM7LTFVCvhXIQ3kubwhhYkBOmIO49Gpy4bvTdEg&oe=67139777',
149+
link: 'https://www.facebook.com/events/871196261705246',
150+
},
151+
{
152+
title: 'CSESOC Boardgames Night',
153+
startTime: 'Thursday, 7 March 2024 17:00:00',
154+
endTime: 'Thursday, 7 March 2024 19:00:00',
155+
location: 'Design Next Studio, Level 5, J17, UNSW',
156+
description: 'The whirlwind of uni got u overwhelmed 😣? Come down to the Design Studio, and chill out with us 🧘‍♀️ as we play board games and indulge in free pizza 🍕!',
157+
image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/429667295_896623802247232_669736057716718914_n.jpg?stp=dst-jpg_s960x960&_nc_cat=102&ccb=1-7&_nc_sid=75d36f&_nc_ohc=Ayn7Skl-pFAQ7kNvgES7wuB&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=AsnAjGmOe-G8q1L6qZb9G3U&oh=00_AYDpfvDY6DpKeydN99VCHujemmm0gZwL7_O1HjXHvwiPsw&oe=671383B1',
158+
link: 'https://www.facebook.com/events/322704110303236',
159+
},
52160
{
53161
title: 'COMP1521 Revision Session',
54162
startTime: 'Wednesday, 31 July 2024 16:00:00',

Diff for: frontend/src/components/Event/EventsGallery.tsx

+18-16
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
import React from 'react';
22
import { previousEvents } from '../../../public/data/events';
3-
import { Gallery } from "react-grid-gallery";
3+
import { RowsPhotoAlbum } from "react-photo-album";
4+
import "react-photo-album/rows.css";
45

56
const EventGallery = () => {
67
const formattedEvents = previousEvents.map((event) => {
78
return {
89
src: event.image,
9-
height: 256,
10-
width: 400,
11-
customOverlay: (
12-
<div className="absolute inset-0 bg-black bg-opacity-60 opacity-100 transition-opacity duration-300 flex items-center justify-center">
10+
height: 80,
11+
width: 120,
12+
};
13+
});
14+
15+
return (
16+
<RowsPhotoAlbum
17+
photos={formattedEvents}
18+
render={{
19+
extras: (_, { index }) => (
20+
<div className="absolute inset-0 bg-black bg-opacity-60 opacity-0 hover:opacity-100 transition-opacity duration-300 flex items-center justify-center">
1321
<div className="text-white text-center p-4">
14-
<h2 className="font-extrabold text-xl mb-2">{event.title}</h2>
15-
<h3 className="font-bold text-lg">{event.location}</h3>
22+
<h2 className="font-extrabold text-xl mb-2">{previousEvents[index].title}</h2>
23+
<h3 className="font-bold text-lg">{previousEvents[index].location}</h3>
1624
<p className="mt-2">
17-
{formatEventDate(event.startTime, event.endTime)}
25+
{formatEventDate(previousEvents[index].startTime, previousEvents[index].endTime)}
1826
</p>
1927
</div>
2028
</div>
21-
),
22-
};
23-
});
24-
25-
return (
26-
<Gallery
27-
images={formattedEvents}
28-
enableImageSelection={false}
29+
),
30+
}}
2931
/>
3032
);
3133
};

0 commit comments

Comments
 (0)