diff --git a/frontend/public/data/events.ts b/frontend/public/data/events.ts index d670d1d..f8e9c60 100644 --- a/frontend/public/data/events.ts +++ b/frontend/public/data/events.ts @@ -11,22 +11,70 @@ export type eventInfo = { export const events: eventInfo[] = [ { - title: 'Rookie Code Rumble - Capture The Flag (CTF) Competition', - startTime: 'Wednesday, 19 June 2024 16:00:00', - endTime: '23:45 22 June 2024', - location: 'Columbo Theatre A, UNSW', - description: 'Want to learn how to hack the mainframeโ“ Want to explore securityโ“ Join us for the Rookie Code Rumble Capture The Flag on June 19thโ€ผ๏ธ ๐Ÿš€\nWin prizes from a $450 Prize Pool๐Ÿ† Teams of up to 3 allowed. Beginners welcomed, no prior experience required and students who haven\'t done security courses are especially welcomed.', - image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/448249337_964318925477719_4689171588021736660_n.jpg?_nc_cat=100&ccb=1-7&_nc_sid=75d36f&_nc_ohc=ORdXB7beljwQ7kNvgGK3EgT&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=AJPQZFI3KDjqlUXpEXj0g4n&oh=00_AYCqsRE9By_qBvBJ5bRLKnci9t6gSiHUGfmIkSQS4WG2LA&oe=67135575', - link: 'https://www.facebook.com/events/427443166914907', + title: 'CSESoc Hoodie General Release 2024', + startTime: 'Monday, 7 Oct 2024 12:00:00', + endTime: 'Friday, 18 Oct 2024 23:59:59', + location: 'Online', + description: 'After much anticipated wait ๐Ÿคฉ, from your design submissions and personal input, our 2024 CSESoc Shell hoodies are now available for order! ๐Ÿฅณ', + image: 'https://scontent.fsyd11-2.fna.fbcdn.net/v/t39.30808-6/462221120_1045429977366613_3924200758993686299_n.jpg?stp=dst-jpg_s960x960&_nc_cat=107&ccb=1-7&_nc_sid=75d36f&_nc_ohc=tt-N_Bd5fd4Q7kNvgFdY5yk&_nc_zt=23&_nc_ht=scontent.fsyd11-2.fna&_nc_gid=AG_QiCaGBWyXh0lwZdZZ73k&oh=00_AYD8zSJw_LFOHaIG7oOFtws9uIbXrCyRwIS0IZkh6ipInQ&oe=67182124', + link: 'https://www.facebook.com/events/858016553106187', }, { - title: 'Open Dev Workshop 1', - startTime: 'Thursday, 13 June 2024 14:00:00', - endTime: 'Thursday, 13 June 2024 16:00:00', - location: 'Civil Engineering Building 102, UNSW', - description: 'Feeling the FOMO to start your own side projects๐Ÿ˜–?? But don\'t know where or how to start??๐Ÿง We have the solution for you: Open Dev Workshop!! ๐Ÿ’ป\nOpen Dev Workshop is an introductory workshop focusing on HTML/CSS and Javascript. With no prior knowledge required, bring your laptop and an eagerness to learn.โค๏ธโ€๐Ÿ”ฅ\nDon\'t miss out on this exciting opportunity and let\'s turn your ideas into reality, one line at a time!! ๐Ÿ”ฅ', - image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/446935726_959621305947481_1708375961476055751_n.jpg?stp=dst-jpg_s960x960&_nc_cat=102&ccb=1-7&_nc_sid=75d36f&_nc_ohc=Y8wgeRzW8DkQ7kNvgEllCg0&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=AemXrjsPaAsS0Jo7t3wNPst&oh=00_AYCFB70t_M0h8epdZ7UKq8LVWL4vqtGIkSC9kGUes1ssvQ&oe=671377D6', - link: 'https://www.facebook.com/events/1020624239688532', + title: 'HUMANS OF CSE OCTOBER ARTICLE - TRANSFERRING DEGREES', + startTime: 'Monday, 14 Oct 2024, 20:00:00', + endTime: 'Monday, 21 Oct 2024, 23:00:00', + location: 'Online', + description: 'Come along with us in this month\'s article ๐ŸŒŽ, as we follow the journey of CSE students who made the switch to these degrees! ๐Ÿ”„ We explore how they decided to transfer ๐Ÿ“œ , what challenges there were getting started, and all the exciting things they\'re up to now! ๐Ÿš€', + image: 'https://scontent.fsyd11-2.fna.fbcdn.net/v/t39.30808-6/463321890_1051317113444566_587573735370794997_n.jpg?stp=dst-jpg_s960x960&_nc_cat=103&ccb=1-7&_nc_sid=75d36f&_nc_ohc=5o-MEkKeoecQ7kNvgEVDfXP&_nc_zt=23&_nc_ht=scontent.fsyd11-2.fna&_nc_gid=Ama2uSCPexSL8fx4vEvJSzh&oh=00_AYAwBP-EHTZUai43wHVQQZ7JRVGuZ4RdOih_C9ocLR1tqw&oe=67182C1D', + link: 'https://www.facebook.com/events/544877388231818/' + }, + { + title: 'Meet the Arista Warriors - BBQ And Talk', + startTime: 'Wednesday, 23 Oct 2024, 12:00:00', + endTime: 'Wednesday, 23 Oct 2024, 16:00:00', + location: 'John Lions Garden, UNSW', + description: "Ready to meet the creators of the fastest switches in the world? โšก Join us for an interactive talk with the Arista Warriors! ๐Ÿ‘ฅ Get a behind-the-scenes look at their network switches ๐Ÿ–ฅ๏ธ, learn how their advanced software drives the performance ๐Ÿ’ป, and meet the talented teams that make it all happen ๐Ÿ‘จโ€๐Ÿ’ป!", + image: 'https://scontent.fsyd11-1.fna.fbcdn.net/v/t39.30808-6/463219819_1051611690081775_3133232766646231661_n.jpg?stp=dst-jpg_s960x960&_nc_cat=110&ccb=1-7&_nc_sid=75d36f&_nc_ohc=DmRNYX-_AtQQ7kNvgFnwOCH&_nc_zt=23&_nc_ht=scontent.fsyd11-1.fna&_nc_gid=AqkzDMqF36HWZbR7hgWA7AK&oh=00_AYDepVjHbmg5wNZvnIh92P49ESA1i-MyUSBA7G09lSQd-g&oe=67181093', + link: 'https://www.facebook.com/events/1739162536859227/' + }, + { + title: 'Nostalgia Night', + startTime: 'Wednesday, 23 Oct 2024, 17:00:00', + endTime: 'Wednesday, 23 Oct 2024, 19:00:00', + location: 'Design Next Studio, Level 5, J17, UNSW', + description: 'Feeling trapped in the endless cycle of assignments and uni commitments? ๐Ÿ“š๐Ÿ˜“ Longing for simpler times when your biggest worry was whether you should watch Giggle and Hoot or make loom bands with your sibling? ๐Ÿ“บ๐Ÿญ Well, dust off your Pokรฉmon cards and polish those yo-yos, because CSESoc is about to send you back to the past with NOSTALGIA NIGHT! ๐Ÿš€โฐ', + image: 'https://scontent.fsyd11-1.fna.fbcdn.net/v/t39.30808-6/462701368_1048050000437944_2801863201980347260_n.jpg?stp=dst-jpg_s960x960&_nc_cat=104&ccb=1-7&_nc_sid=75d36f&_nc_ohc=m4Sy0L-V9i8Q7kNvgGYoF5X&_nc_zt=23&_nc_ht=scontent.fsyd11-1.fna&_nc_gid=A2nTAu82YR1NE7-13Zxaw3n&oh=00_AYAk4v2MHtB9pFASHYQe2wnY153oxVDZ8qaI_my6JMPL0Q&oe=671828EA', + link: 'https://www.facebook.com/events/1244647416584933/', + }, + { + title: 'CSESoc x EngSoc: Hallo-Wasted', + startTime: 'Friday, 1 Nov 2024, 19:00:00', + endTime: 'Friday, 1 Nov 2024, 23:00:00', + location: 'Scruffy Murphy\'s', + description: 'Fear no more โ€” or even more ๐Ÿซฃ, as CSESoc and EngSoc invites you to crawl out ๐Ÿบ๐Ÿ•ท๏ธ from your study dungeons for the most nerve-wrecking night you wonโ€™t forget โ€” at the Hallo-Wasted Party! ๐Ÿพ๐Ÿ™€', + image: 'https://scontent.fsyd11-1.fna.fbcdn.net/v/t39.30808-6/462393945_1046485953927682_3594406987464705203_n.jpg?stp=dst-jpg_s960x960&_nc_cat=104&ccb=1-7&_nc_sid=75d36f&_nc_ohc=TlCztpaxbygQ7kNvgG9Iqn6&_nc_zt=23&_nc_ht=scontent.fsyd11-1.fna&_nc_gid=AYwaFSvxbBBT3KlbgOVDc1U&oh=00_AYC6aVx3Qlo-fxE8spGoEIAHE6rkAcguZivNCYKLy-d3hQ&oe=67182060', + link: 'https://www.facebook.com/events/903031551735450/', + } +]; + +export const previousEvents: eventInfo[] = [ + { + title: "Tech n' Tonic", + startTime: 'Monday, 14 Oct 2024 18:00:00', + endTime: 'Monday, 14 Oct 2024 20:00:00', + location: 'Hilton Hotel Sydney George St', + description: "Starry skies โœจ and business ties ๐Ÿ‘” - are you ready for an evening of cocktails and connections at Tech 'n Tonic?", + image: 'https://scontent.fsyd11-2.fna.fbcdn.net/v/t39.30808-6/462109432_1042899677619643_4447945625462875474_n.jpg?stp=dst-jpg_s960x960&_nc_cat=102&ccb=1-7&_nc_sid=75d36f&_nc_ohc=LldgnyrrPzoQ7kNvgEkT9rZ&_nc_zt=23&_nc_ht=scontent.fsyd11-2.fna&_nc_gid=A4abttUIAM0znnZ5DhCSuH6&oh=00_AYCoja001nrw11TBm65CTUy7YeC7qUDzLQWZvPb8pAGXLw&oe=6718235B', + link: 'https://www.facebook.com/events/1078496197200589/' + }, + { + title: "CSESoc Director Recruitment 2025", + startTime: 'Wednesday, 9 Oct 2024 23:00:00', + endTime: 'Wednesday, 16 Oct 2024 23:59:59', + location: 'Online', + description: 'OUR DIRECTOR RECRUITMENT APPLICATIONS HAVE OPENED ๐Ÿ“ ๐Ÿ“ญ', + image: 'https://scontent.fsyd11-1.fna.fbcdn.net/v/t39.30808-6/462491605_1047315693844708_8503531889535504643_n.jpg?stp=dst-jpg_s960x960&_nc_cat=106&ccb=1-7&_nc_sid=75d36f&_nc_ohc=lREBeWLY_uEQ7kNvgGzvZGT&_nc_zt=23&_nc_ht=scontent.fsyd11-1.fna&_nc_gid=AMGGaNEtlriGsleeiuMvJrs&oh=00_AYAeOSpSszxjzFvQsoLcT72TDooiJ27Ec9X-hhOU0RAnaA&oe=67183209', + link: 'https://www.facebook.com/events/882759546829988/' }, { title: '2024 FMAA STEM Alternative Pathways Evening', @@ -45,44 +93,5 @@ export const events: eventInfo[] = [ description: 'Looking for a creative way to celebrate diversity?๐Ÿค”๐ŸŒŸ Come along for an afternoon of fun where youโ€™ll get to design and decorate your own gift box ๐ŸŽ filled with cultural sweets from around the world!๐ŸŒ Try new flavours and treats as you craft your masterpiece for a friend, family member or yourself ๐Ÿ˜‹', image: 'https://scontent.fsyd14-1.fna.fbcdn.net/v/t39.30808-6/461677000_1040949901147954_3024711492723797720_n.jpg?stp=dst-jpg_s960x960&_nc_cat=100&ccb=1-7&_nc_sid=75d36f&_nc_ohc=zY_RqNGeg50Q7kNvgH4izQ8&_nc_zt=23&_nc_ht=scontent.fsyd14-1.fna&_nc_gid=AEzNe6W68jyyD37bJY9us2s&oh=00_AYAwuI1WXfZjhpeWSbHT1clhl05xVZdo0E-3nMCXo-Ndkw&oe=67139F71', link: 'https://www.facebook.com/events/9261495757199727', - } -]; - -export const previousEvents: eventInfo[] = [ - { - title: 'COMP1521 Revision Session', - startTime: 'Wednesday, 31 July 2024 16:00:00', - endTime: 'Wednesday, 31 July 2024 18:00:00', - location: 'UNSW Colombo Theatre B', - 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 โ€ผ๏ธ', - 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', - link: 'https://www.facebook.com/events/1911189126010096', - }, - { - title: 'IMC Coding Competition', - startTime: 'Wednesday, 13 March 2024 15:00:00', - endTime: 'Wednesday, 13 March 2024 18:00:00', - location: 'Mathews Theatre B, UNSW', - 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??? ๐Ÿ˜ฃ', - 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', - link: 'https://www.facebook.com/events/1106870833796065', - }, - { - title: 'Cultural BBQ', - startTime: 'Wednesday, 17 July 2024 12:00:00', - endTime: 'Wednesday, 17 July 2024 14:00:00', - location: 'Globe Lawn', - 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๐Ÿ–๐ŸŒŸ', - 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', - link: 'https://www.facebook.com/events/871196261705246', - }, - { - title: 'CSESOC Boardgames Night', - startTime: 'Thursday, 7 March 2024 17:00:00', - endTime: 'Thursday, 7 March 2024 19:00:00', - location: 'Design Next Studio, Level 5, J17, UNSW', - 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 ๐Ÿ•!', - 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', - link: 'https://www.facebook.com/events/322704110303236', }, ]; diff --git a/frontend/src/components/Event/EventsCarousel.tsx b/frontend/src/components/Event/EventsCarousel.tsx index 32a7268..df08091 100644 --- a/frontend/src/components/Event/EventsCarousel.tsx +++ b/frontend/src/components/Event/EventsCarousel.tsx @@ -62,11 +62,17 @@ const formatEventDate = (startTime: string, endTime: string): string => { const startDate = new Date(startTime); const endDate = new Date(endTime); - const sameDay = startDate.toDateString() === endDate.toDateString(); + const options: Intl.DateTimeFormatOptions = { day: '2-digit', month: '2-digit', year: 'numeric' }; + + const formatDate = (date: Date): string => { + return new Intl.DateTimeFormat('en-AU', options).format(date).replace(/\//g, '/'); + }; + const sameDay = startDate.toDateString() === endDate.toDateString(); + if (sameDay) { - return startDate.toLocaleDateString(); + return formatDate(startDate); // Return single date in dd/mm/yyyy } else { - return `${startDate.toLocaleDateString()} - ${endDate.toLocaleDateString()}`; + return `${formatDate(startDate)} - ${formatDate(endDate)}`; // Return date range } -}; \ No newline at end of file +};