diff --git a/frontend/components.json b/frontend/components.json index 90e9bf9..992c230 100644 --- a/frontend/components.json +++ b/frontend/components.json @@ -18,4 +18,4 @@ "hooks": "@/hooks" }, "iconLibrary": "lucide" -} \ No newline at end of file +} diff --git a/frontend/public/data/events.ts b/frontend/public/data/events.ts index 9aa3c29..79497b2 100644 --- a/frontend/public/data/events.ts +++ b/frontend/public/data/events.ts @@ -10,70 +10,70 @@ export type eventInfo = { export const events: eventInfo[] = [ { - title: "Startup Spotlight Barbeque", - startTime: "Wednesday, 11 June 2025 12:00:00", - endTime: "Wednesday, 11 June 2025 14:00:00", - location: "John Lions Garden", - image: "/images/events/startup_spotlight_bbq.jpg", - link: "https://www.facebook.com/events/1018289650496840" + title: 'Startup Spotlight Barbeque', + startTime: 'Wednesday, 11 June 2025 12:00:00', + endTime: 'Wednesday, 11 June 2025 14:00:00', + location: 'John Lions Garden', + image: '/images/events/startup_spotlight_bbq.jpg', + link: 'https://www.facebook.com/events/1018289650496840' }, { title: "Mister Maker's Magic Table", - startTime: "Wednesday, 18 June 2025 13:00:00", - endTime: "Wednesday, 18 June 2025 15:00:00", - location: "UNSW Quad", - image: "/images/events/mister_makers_magic_table.jpg", - link: "https://www.facebook.com/events/1224929275882537" + startTime: 'Wednesday, 18 June 2025 13:00:00', + endTime: 'Wednesday, 18 June 2025 15:00:00', + location: 'UNSW Quad', + image: '/images/events/mister_makers_magic_table.jpg', + link: 'https://www.facebook.com/events/1224929275882537' }, { - title: "Industry Mentoring Program Launch", - startTime: "Wednesday, 18 June 2025 18:00:00", - endTime: "Wednesday, 18 June 2025 20:00:00", - location: "Rex Vowels Theatre", - image: "/images/events/industry_mentoring_program.jpg", - link: "https://www.facebook.com/events/1776932683235783" + title: 'Industry Mentoring Program Launch', + startTime: 'Wednesday, 18 June 2025 18:00:00', + endTime: 'Wednesday, 18 June 2025 20:00:00', + location: 'Rex Vowels Theatre', + image: '/images/events/industry_mentoring_program.jpg', + link: 'https://www.facebook.com/events/1776932683235783' }, { - title: "Rookie Code Rumble", - startTime: "Friday, 30 May 2025 18:00:00", - endTime: "Friday, 6 June 2025 23:59:59", - location: "Online (kick-off location TBD)", - image: "/images/events/rookie_code_rumble.jpg", - link: "https://www.facebook.com/events/1062484559164505" + title: 'Rookie Code Rumble', + startTime: 'Friday, 30 May 2025 18:00:00', + endTime: 'Friday, 6 June 2025 23:59:59', + location: 'Online (kick-off location TBD)', + image: '/images/events/rookie_code_rumble.jpg', + link: 'https://www.facebook.com/events/1062484559164505' } ]; export const previousEvents: eventInfo[] = [ { - title: "Brawl Stars Tournament", - startTime: "Thursday, 29 May 2025 20:00:00", - endTime: "Thursday, 29 May 2025 22:30:00", - location: "Online via Discord", - image: "/images/events/brawl_stars.jpg", - link: "https://www.facebook.com/events/1251081513377441" + title: 'Brawl Stars Tournament', + startTime: 'Thursday, 29 May 2025 20:00:00', + endTime: 'Thursday, 29 May 2025 22:30:00', + location: 'Online via Discord', + image: '/images/events/brawl_stars.jpg', + link: 'https://www.facebook.com/events/1251081513377441' }, { - title: "Flower Exchange", - startTime: "Wednesday, 23 Apr 2025 13:00:00", - endTime: "Wednesday, 23 Apr 2025 15:00:00", - location: "The Quad, UNSW", - image: "/images/events/flower_exchange.jpg", - link: "https://www.facebook.com/events/623535984011063" + title: 'Flower Exchange', + startTime: 'Wednesday, 23 Apr 2025 13:00:00', + endTime: 'Wednesday, 23 Apr 2025 15:00:00', + location: 'The Quad, UNSW', + image: '/images/events/flower_exchange.jpg', + link: 'https://www.facebook.com/events/623535984011063' }, { - title: "All the Stars Pubcrawl", - startTime: "Friday, 28 Mar 2025 19:00:00", - endTime: "Friday, 28 Mar 2025 23:30:00", - location: "Meet at Hyde Park", - image: "/images/events/all_the_stars.jpg", - link: "https://www.facebook.com/events/1171496917957222" + title: 'All the Stars Pubcrawl', + startTime: 'Friday, 28 Mar 2025 19:00:00', + endTime: 'Friday, 28 Mar 2025 23:30:00', + location: 'Meet at Hyde Park', + image: '/images/events/all_the_stars.jpg', + link: 'https://www.facebook.com/events/1171496917957222' }, { - title: "Wheelchair Basketball Tournament", - startTime: "Sunday, 13 Apr 2025 13:00:00", - endTime: "Sunday, 13 Apr 2025 16:00:00", - location: "UNSW Village Green (Multi-purpose caged courts near Sam Cracknell Pavilion)", - image: "/images/events/wheelchair_basketball.jpg", - link: "https://www.facebook.com/events/3852672894949394" + title: 'Wheelchair Basketball Tournament', + startTime: 'Sunday, 13 Apr 2025 13:00:00', + endTime: 'Sunday, 13 Apr 2025 16:00:00', + location: 'UNSW Village Green (Multi-purpose caged courts near Sam Cracknell Pavilion)', + image: '/images/events/wheelchair_basketball.jpg', + link: 'https://www.facebook.com/events/3852672894949394' } ]; diff --git a/frontend/public/data/execs.ts b/frontend/public/data/execs.ts index 0dd3377..39ac4a4 100644 --- a/frontend/public/data/execs.ts +++ b/frontend/public/data/execs.ts @@ -1,45 +1,45 @@ // TODO: Combine with portfolios.ts export type Exec = { - name: string, - role: string, + name: string; + role: string; }; export const EXECS: Exec[] = [ { - name: "Joyce He", - role: "Co-President", + name: 'Joyce He', + role: 'Co-President' }, { - name: "Susie Xia", - role: "Co-President", + name: 'Susie Xia', + role: 'Co-President' }, { - name: "Zitian Qin", - role: "Secretary", + name: 'Zitian Qin', + role: 'Secretary' }, { - name: "Lisa Lin", - role: "Treasurer", + name: 'Lisa Lin', + role: 'Treasurer' }, { - name: "Leo Maisnam", - role: "Arc Delegate", + name: 'Leo Maisnam', + role: 'Arc Delegate' }, { - name: "Aryan Chauhan", - role: "Grievance, Equity, Diversity and Inclusion Officer", + name: 'Aryan Chauhan', + role: 'Grievance, Equity, Diversity and Inclusion Officer' }, { - name: "Emma Nguyen", - role: "Vice President (External)", + name: 'Emma Nguyen', + role: 'Vice President (External)' }, { - name: "Jordan Djamaan", - role: "Vice President (Internal)", + name: 'Jordan Djamaan', + role: 'Vice President (Internal)' }, { - name: "JJ Roberts-White", - role: "Vice President (Technical)", - }, + name: 'JJ Roberts-White', + role: 'Vice President (Technical)' + } ]; diff --git a/frontend/public/data/portfolios.ts b/frontend/public/data/portfolios.ts index f810131..8d4a5fb 100644 --- a/frontend/public/data/portfolios.ts +++ b/frontend/public/data/portfolios.ts @@ -1,132 +1,256 @@ export type PortfolioData = { - name: string, - description: string, - members: PortfolioMember[], + name: string; + description: string; + members: PortfolioMember[]; }; export type PortfolioMember = { - name: string, - role: PortfolioRole, + name: string; + role: PortfolioRole; imageUrl: string; -} +}; export enum PortfolioRole { - DIRECTOR = "Director", - SUBCOM = "Subcommittee", + DIRECTOR = 'Director', + SUBCOM = 'Subcommittee' } export const PORTFOLIOS: PortfolioData[] = [ { - name: "Careers", - description: "Facilitates industry sponsor relations, as well as creating events focused on interpersonal development and networking.", + name: 'Careers', + description: + 'Facilitates industry sponsor relations, as well as creating events focused on interpersonal development and networking.', members: [ - { name: "Nathan Lin", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Michael Liu", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Angel Yu", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { + name: 'Nathan Lin', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Michael Liu', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { name: 'Angel Yu', role: PortfolioRole.DIRECTOR, imageUrl: '/images/members/blank-pfp.png' } + ] }, { - name: "Events", - description: "Plans a diverse range of large-scale activities while focusing on creating an enjoyable and fun experiences for all participants!", + name: 'Events', + description: + 'Plans a diverse range of large-scale activities while focusing on creating an enjoyable and fun experiences for all participants!', members: [ - { name: "Lee Torr Chin", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Ethan Gu", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Kayla Lee", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { + name: 'Lee Torr Chin', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { name: 'Ethan Gu', role: PortfolioRole.DIRECTOR, imageUrl: '/images/members/blank-pfp.png' }, + { name: 'Kayla Lee', role: PortfolioRole.DIRECTOR, imageUrl: '/images/members/blank-pfp.png' } + ] }, { - name: "Outreach", - description: "Creates inclusive and approachable events targeted towards overlooked and underrepresented students.", + name: 'Outreach', + description: + 'Creates inclusive and approachable events targeted towards overlooked and underrepresented students.', members: [ - { name: "Qiandai Huang", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Hayden Ho", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Liem Phan", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { + name: 'Qiandai Huang', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Hayden Ho', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { name: 'Liem Phan', role: PortfolioRole.DIRECTOR, imageUrl: '/images/members/blank-pfp.png' } + ] }, { - name: "Socials", - description: "Organises approachable events targeted towards building an inclusive and welcoming community, to help build long-lasting friendships!", + name: 'Socials', + description: + 'Organises approachable events targeted towards building an inclusive and welcoming community, to help build long-lasting friendships!', members: [ - { name: "Patrick Sun", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Makeen Alaeddin", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "April Choi", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { + name: 'Patrick Sun', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Makeen Alaeddin', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'April Choi', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + } + ] }, { - name: "Creative", - description: "Lays the groundwork for CSESoc's aesthetic branding, providing an outlet for creative expression.", + name: 'Creative', + description: + "Lays the groundwork for CSESoc's aesthetic branding, providing an outlet for creative expression.", members: [ - { name: "Jasmine Chiu", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Louis Policarpio", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Ralph Capricho", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { + name: 'Jasmine Chiu', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Louis Policarpio', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Ralph Capricho', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + } + ] }, { - name: "HR", - description: "Fosters the internal culture of the internal/external team - bringing people together, encouraging a supportive environment and most of all - memories.", + name: 'HR', + description: + 'Fosters the internal culture of the internal/external team - bringing people together, encouraging a supportive environment and most of all - memories.', members: [ - { name: "Darien Trinh", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Isabella Tan", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Jenny Tran", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { + name: 'Darien Trinh', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Isabella Tan', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Jenny Tran', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + } + ] }, { - name: "Marketing", - description: "Promotes CSESoc on our social media as well as creating supplementary marketing material to engage our audience.", + name: 'Marketing', + description: + 'Promotes CSESoc on our social media as well as creating supplementary marketing material to engage our audience.', members: [ - { name: "Sienna Gunawan", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Vedant Vaghela", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Joanna Wong", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { + name: 'Sienna Gunawan', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Vedant Vaghela', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Joanna Wong', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + } + ] }, { - name: "Media", - description: "Focuses on creating content for our CSESoc community and beyond to capture our diverse student voice.", + name: 'Media', + description: + 'Focuses on creating content for our CSESoc community and beyond to capture our diverse student voice.', members: [ - { name: "Hae Kim", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Bella Li", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Christine Park", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { name: 'Hae Kim', role: PortfolioRole.DIRECTOR, imageUrl: '/images/members/blank-pfp.png' }, + { name: 'Bella Li', role: PortfolioRole.DIRECTOR, imageUrl: '/images/members/blank-pfp.png' }, + { + name: 'Christine Park', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + } + ] }, { - name: "Competitions", - description: "Organises a variety of contests to empower students beyond coursework and allow them meet others.", + name: 'Competitions', + description: + 'Organises a variety of contests to empower students beyond coursework and allow them meet others.', members: [ - { name: "Luke Zeng", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Xuanyu Liu", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Valerie Chan", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { + name: 'Luke Zeng', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Xuanyu Liu', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Valerie Chan', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + } + ] }, { - name: "Education", - description: "Teaches interesting technical skills to the community, whether that's through workshops, articles, or programs.", + name: 'Education', + description: + "Teaches interesting technical skills to the community, whether that's through workshops, articles, or programs.", members: [ - { name: "Eric Xu", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Erica Lin", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Andrew Zhang", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { name: 'Eric Xu', role: PortfolioRole.DIRECTOR, imageUrl: '/images/members/blank-pfp.png' }, + { + name: 'Erica Lin', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Andrew Zhang', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + } + ] }, { - name: "IT", - description: "Oversees the development of the CSESoc's internal projects and plays an active role in the technical aspects of our society.", + name: 'IT', + description: + "Oversees the development of the CSESoc's internal projects and plays an active role in the technical aspects of our society.", members: [ - { name: "Dylan Zhang", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Justine Kim", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { + name: 'Dylan Zhang', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Justine Kim', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + } + ] }, { - name: "Digital", - description: "Expands CSESoc's vibrant community into the virtual world, running online events and managing our online spaces to make sure everyone feels welcomed in our community.", + name: 'Digital', + description: + "Expands CSESoc's vibrant community into the virtual world, running online events and managing our online spaces to make sure everyone feels welcomed in our community.", members: [ - { name: "Jasmine Chia", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - { name: "Aaron Tian", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, - ], + { + name: 'Jasmine Chia', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + }, + { + name: 'Aaron Tian', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + } + ] }, { - name: "Platforms", - description: "Maintains the infrastructure underlying the CSESoc IT Portfolio Projects.", + name: 'Platforms', + description: 'Maintains the infrastructure underlying the CSESoc IT Portfolio Projects.', members: [ - { name: "Dominic Cheung", role: PortfolioRole.DIRECTOR, imageUrl: "/images/members/blank-pfp.png" }, + { + name: 'Dominic Cheung', + role: PortfolioRole.DIRECTOR, + imageUrl: '/images/members/blank-pfp.png' + } ] } ]; diff --git a/frontend/public/data/socialInfos.ts b/frontend/public/data/socialInfos.ts index f8b3957..c46c53e 100644 --- a/frontend/public/data/socialInfos.ts +++ b/frontend/public/data/socialInfos.ts @@ -3,7 +3,7 @@ export type socialInfo = { src: string; alt: string; }; - + export const socialLinks: socialInfo[] = [ { href: 'https://bit.ly/CSESocDiscord', diff --git a/frontend/public/data/sponsorInfos.ts b/frontend/public/data/sponsorInfos.ts index 49bfadd..b2ce01e 100644 --- a/frontend/public/data/sponsorInfos.ts +++ b/frontend/public/data/sponsorInfos.ts @@ -81,7 +81,7 @@ export const goldLinks: sponsorInfo[] = [ alt: 'SafetyCulture logo', description: 'Get to the root cause of workplace trends with total visibility across your organization. Use data from completed inspections, reported incidents, sensors, and asset history to keep workers safe, and prevent things from happening in the first place.' - }, + } ]; export const silverLinks: sponsorInfo[] = [ @@ -91,7 +91,7 @@ export const silverLinks: sponsorInfo[] = [ svg: '/assets/quantium_logo.svg', alt: 'Quantium logo', description: - "We combine the best of human and artificial intelligence to power possibilities for individuals, organisations and society. Through the application of world leading, advanced analytics solutions, we help our clients solve their most complex problems." + 'We combine the best of human and artificial intelligence to power possibilities for individuals, organisations and society. Through the application of world leading, advanced analytics solutions, we help our clients solve their most complex problems.' }, { name: 'Optiver', @@ -163,5 +163,5 @@ export const silverLinks: sponsorInfo[] = [ alt: 'revolutioniseSport logo', description: 'revolutioniseSPORT is an online management platform for sports of all shapes and sizes.' - }, + } ]; diff --git a/frontend/src/components/About/AboutHomepage.tsx b/frontend/src/components/About/AboutHomepage.tsx index 4492b71..1492b19 100644 --- a/frontend/src/components/About/AboutHomepage.tsx +++ b/frontend/src/components/About/AboutHomepage.tsx @@ -1,4 +1,4 @@ -import Image from "next/image"; +import Image from 'next/image'; export default function AboutHomePage() { return ( @@ -29,22 +29,30 @@ export default function AboutHomePage() {
Mail - info@csesoc.org.au + + info@csesoc.org.au +
{/* RIGHT SIDE */}

- We are one of the largest and most active societies at UNSW, and {" "} - the largest computing society in the southern hemisphere. -

- CSESoc comprises {" "} - over 16k members - {" "}spanning across various degrees including Computer Science, - Software Engineering, Bioinformatics and Computer Engineering. -

- We are here to fulfil the social, personal and professional needs of CSE students, - and promote computing through a variety of forms. + We are one of the largest and most active societies at UNSW, and{' '} + + the largest computing society in the southern hemisphere + + . +
+
+ CSESoc comprises + over 16k members + {' '} + spanning across various degrees including Computer Science, Software Engineering, + Bioinformatics and Computer Engineering. +
+
+ We are here to fulfil the social, personal and professional needs of CSE students, and + promote computing through a variety of forms.

diff --git a/frontend/src/components/About/PortfolioCard.tsx b/frontend/src/components/About/PortfolioCard.tsx index 7160a1b..642f571 100644 --- a/frontend/src/components/About/PortfolioCard.tsx +++ b/frontend/src/components/About/PortfolioCard.tsx @@ -1,20 +1,18 @@ // import Image from 'next/image'; -import { PortfolioData } from "@/../public/data/portfolios"; +import { PortfolioData } from '@/../public/data/portfolios'; interface PortfolioCardProps { - portfolio: PortfolioData, + portfolio: PortfolioData; } // NOTE: Profile pictures can be added in the future const PortfolioCard = ({ portfolio }: PortfolioCardProps) => { return (
-

- {portfolio.description} -

+

{portfolio.description}

- {portfolio.members.map(member => ( + {portfolio.members.map((member) => (
{/* { width={150} height={150} /> */} - +

{member.name}

{member.role}

@@ -32,6 +30,6 @@ const PortfolioCard = ({ portfolio }: PortfolioCardProps) => {
); -} +}; -export default PortfolioCard; \ No newline at end of file +export default PortfolioCard; diff --git a/frontend/src/components/About/PortfolioDisplay.tsx b/frontend/src/components/About/PortfolioDisplay.tsx index 433c8b1..78d2644 100644 --- a/frontend/src/components/About/PortfolioDisplay.tsx +++ b/frontend/src/components/About/PortfolioDisplay.tsx @@ -1,22 +1,24 @@ -import { useState } from "react"; -import PortfolioCard from "./PortfolioCard"; -import { PORTFOLIOS } from "@/../public/data/portfolios"; +import { useState } from 'react'; +import PortfolioCard from './PortfolioCard'; +import { PORTFOLIOS } from '@/../public/data/portfolios'; const PortfolioDisplay = () => { - const [selectedPortfolio, setSelectedPortfolio] = useState("Careers"); - - const names = PORTFOLIOS.map(port => port.name); + const [selectedPortfolio, setSelectedPortfolio] = useState('Careers'); + + const names = PORTFOLIOS.map((port) => port.name); return (
-
+ [&::-webkit-scrollbar-thumb]:bg-gray-300" + > {names.map((name) => ( - ))}
- - port.name === selectedPortfolio) ?? PORTFOLIOS[0]} /> + + port.name === selectedPortfolio) ?? PORTFOLIOS[0]} + />
- ) -} + ); +}; -export default PortfolioDisplay; \ No newline at end of file +export default PortfolioDisplay; diff --git a/frontend/src/components/Contacts/index.tsx b/frontend/src/components/Contacts/index.tsx index ef96541..453b634 100644 --- a/frontend/src/components/Contacts/index.tsx +++ b/frontend/src/components/Contacts/index.tsx @@ -8,95 +8,91 @@ const socialsBoxStyling = const Contacts = () => { return (
- + - -
); }; diff --git a/frontend/src/components/Event/EventsBrief.tsx b/frontend/src/components/Event/EventsBrief.tsx index 65105eb..e64d875 100644 --- a/frontend/src/components/Event/EventsBrief.tsx +++ b/frontend/src/components/Event/EventsBrief.tsx @@ -9,18 +9,19 @@ const EventBrief = () => {

UPCOMING EVENTS

- {events.length !== 0 ? - : + {events.length !== 0 ? ( + + ) : (

No upcoming events... check back here later!

- } + )} diff --git a/frontend/src/components/Event/EventsCarousel.tsx b/frontend/src/components/Event/EventsCarousel.tsx index df08091..8d74395 100644 --- a/frontend/src/components/Event/EventsCarousel.tsx +++ b/frontend/src/components/Event/EventsCarousel.tsx @@ -6,20 +6,20 @@ export default function EventsCarousel() { const responsive = { superLargeDesktop: { breakpoint: { max: 4000, min: 1024 }, - items: 3, + items: 3 }, desktop: { breakpoint: { max: 1024, min: 768 }, - items: 3, + items: 3 }, tablet: { breakpoint: { max: 768, min: 464 }, - items: 2, + items: 2 }, mobile: { breakpoint: { max: 464, min: 0 }, - items: 1, - }, + items: 1 + } }; return ( @@ -36,7 +36,12 @@ export default function EventsCarousel() { > {events.map((event, index) => (
@@ -69,7 +72,7 @@ const formatEventDate = (startTime: string, endTime: string): string => { }; const sameDay = startDate.toDateString() === endDate.toDateString(); - + if (sameDay) { return formatDate(startDate); // Return single date in dd/mm/yyyy } else { diff --git a/frontend/src/components/Event/EventsGallery.tsx b/frontend/src/components/Event/EventsGallery.tsx index 83738be..87d204f 100644 --- a/frontend/src/components/Event/EventsGallery.tsx +++ b/frontend/src/components/Event/EventsGallery.tsx @@ -8,19 +8,18 @@ const EventGallery = () => { return (
- - {event.title} + + {event.title}

{event.title}

{event.location}

-

- {formatEventDate(event.startTime, event.endTime)} -

+

{formatEventDate(event.startTime, event.endTime)}

@@ -45,4 +44,4 @@ const formatEventDate = (startTime: string, endTime: string): string => { } else { return `${startDate.toLocaleDateString()} - ${endDate.toLocaleDateString()}`; } -}; \ No newline at end of file +}; diff --git a/frontend/src/components/Event/index.tsx b/frontend/src/components/Event/index.tsx index dce454e..be908b8 100644 --- a/frontend/src/components/Event/index.tsx +++ b/frontend/src/components/Event/index.tsx @@ -1,45 +1,45 @@ -import React from 'react'; -import { events } from '../../../public/data/events'; -import EventsCarousel from './EventsCarousel'; -import EventGallery from './EventsGallery'; - -const Event = () => { - return ( -
-
-

EVENTS

-
-
-
-

- We run a wide-variety of events for fun, learning new skills and careers. For full - listings, check out our {' '} - Facebook page! -

-
-
-
-

- Explore upcoming events -

-
- {events.length !== 0 ? - : -
-

No upcoming events... check back here later!

-
- } -
-

- Previous events -

-
- -
- ); -}; - -export default Event; +import React from 'react'; +import { events } from '../../../public/data/events'; +import EventsCarousel from './EventsCarousel'; +import EventGallery from './EventsGallery'; + +const Event = () => { + return ( +
+
+

EVENTS

+
+
+
+

+ We run a wide-variety of events for fun, learning new skills and careers. For full + listings, check out our{' '} + + Facebook page + + ! +

+
+
+
+

Explore upcoming events

+
+ {events.length !== 0 ? ( + + ) : ( +
+

No upcoming events... check back here later!

+
+ )} +
+

Previous events

+
+ +
+ ); +}; + +export default Event; diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx index dfd66f1..380ab10 100644 --- a/frontend/src/components/Footer.tsx +++ b/frontend/src/components/Footer.tsx @@ -9,7 +9,12 @@ const Footer = () => {
- CSESoc Logo + CSESoc Logo Ollie {
B03 CSE Building K17, UNSW
- csesoc@csesoc.org.au + + csesoc@csesoc.org.au +

© 2025 — CSESoc UNSW

diff --git a/frontend/src/components/Hamburger.tsx b/frontend/src/components/Hamburger.tsx index ff82444..fd9333b 100644 --- a/frontend/src/components/Hamburger.tsx +++ b/frontend/src/components/Hamburger.tsx @@ -1,103 +1,169 @@ import React, { useState, useEffect } from 'react'; +import ReactDOM from 'react-dom'; +import { Menu, X } from 'lucide-react'; import Link from 'next/link'; -import { motion } from 'framer-motion'; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu"; +import Image from 'next/image'; +import { socialLinks } from '@/../public/data/socialInfos'; -export default function Hamburger() { - const [isOpenDropdown, setIsOpenDropdown] = useState(false); +const Hamburger = () => { + // Needs dom element to be same bfore and after + // setIsOpen(true) occurs first while dom portal doesnt exist + // Then creates dom portal + // So it tries to go from isOpen=true to isOpen=true + // So no animation occurs as it starts from its finishing val + // So we need to create dom portal first, then menu + // animation should only start after dom portal is created + const [isOpen, setIsOpen] = useState(false); + const [showMenu, setShowMenu] = useState(false); + + const openMenu = () => { + setShowMenu(true); + setTimeout(() => setIsOpen(true), 10); + }; + + const closeMenu = () => { + setIsOpen(false); + setTimeout(() => setShowMenu(false), 300); + }; + + useEffect(() => { + if (showMenu) { + // Add padding when scrollbar vanishes + const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth; + document.body.style.overflow = 'hidden'; + document.body.style.paddingRight = `${scrollbarWidth}px`; + } + + return () => { + document.body.style.overflow = ''; + document.body.style.paddingRight = ''; + }; + }, [showMenu]); useEffect(() => { - const handleResize = () => { - setIsOpenDropdown(false); + const handleEscape = (e: KeyboardEvent) => { + if (e.key === 'Escape') closeMenu(); }; - window.addEventListener('resize', handleResize); - return () => window.removeEventListener('resize', handleResize); - }, []); + if (showMenu) document.addEventListener('keydown', handleEscape); - return ( - - - - - - - - - - About Us - - - - - - Events - - - - - - Resources - - - - - - Sponsors - - - - - - Contact Us - - - - - { + document.removeEventListener('keydown', handleEscape); + }; + }, [showMenu]); + + // Portal renders the backdrop at document.body level + // Hence, instead of showing just at nav, shows over all components + const backdrop = + showMenu && typeof document !== 'undefined' + ? ReactDOM.createPortal( + // Backdrop +
- Merch - - - - + {/* Sidebar */} +
e.stopPropagation()} + > + + +
+
+ + About Us + + + + Events + + + + Resources + + + + Sponsors + + + + Contact Us + + + + Merch + +
+ +
+ +
+ {socialLinks.map((item, index) => { + return ( + + {item.alt} + + ); + })} +
+
+
+
, + document.body + ) + : null; + + return ( + <> + + {backdrop} + ); -} \ No newline at end of file +}; + +export default Hamburger; \ No newline at end of file diff --git a/frontend/src/components/Landing/index.tsx b/frontend/src/components/Landing/index.tsx index 1eeff62..7005ffe 100644 --- a/frontend/src/components/Landing/index.tsx +++ b/frontend/src/components/Landing/index.tsx @@ -6,7 +6,6 @@ const Landing = () => { className="flex flex-col min-h-screen justify-end py-8 xl:px-24 md:px-10 px-5 relative overflow-hidden" id="landing" > -
@@ -19,13 +18,14 @@ const Landing = () => {

{'

'}

We are the principal representative body for{' '} - UNSW computing - - {' '}students. + {' '} + students.

{''}

diff --git a/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx index f684d22..429a928 100644 --- a/frontend/src/components/Layout.tsx +++ b/frontend/src/components/Layout.tsx @@ -4,14 +4,13 @@ import React from 'react'; const Layout = ({ children }: { children: React.ReactNode }) => { return ( -
+
- -
+ +
{children}
-
); }; diff --git a/frontend/src/components/Navbar.tsx b/frontend/src/components/Navbar.tsx index 6c43a3b..c164813 100644 --- a/frontend/src/components/Navbar.tsx +++ b/frontend/src/components/Navbar.tsx @@ -7,9 +7,11 @@ import Terminal from './Terminal'; const Navbar = () => { const [path, setPath] = useState([]); useEffect(() => { - const pathSegments: string[] | undefined = window.location.pathname.split('/').filter(segment => segment); + const pathSegments: string[] | undefined = window.location.pathname + .split('/') + .filter((segment) => segment); if (pathSegments === undefined) setPath([]); - else setPath(pathSegments.map(segment => segment.toUpperCase())); + else setPath(pathSegments.map((segment) => segment.toUpperCase())); }, []); return ( @@ -27,10 +29,12 @@ const Navbar = () => {

csesoc@unsw : - ~{path.map(segment => '/' + segment.toLowerCase())} + + ~{path.map((segment) => '/' + segment.toLowerCase())} + $ {/* The interactive terminal that allows changing pages using 'cd' */} - +

@@ -50,7 +54,7 @@ const Navbar = () => {
{'//'} contact us
- + Merchandise Store Icon {
-
+
); }; diff --git a/frontend/src/components/PageBody.tsx b/frontend/src/components/PageBody.tsx index e63d960..4d9a3c0 100644 --- a/frontend/src/components/PageBody.tsx +++ b/frontend/src/components/PageBody.tsx @@ -1,13 +1,11 @@ -import React from "react"; +import React from 'react'; const PageBody = ({ children }: { children: React.ReactNode }) => { return (
-
- {children} -
+
{children}
); -} +}; export default PageBody; diff --git a/frontend/src/components/PageTitle.tsx b/frontend/src/components/PageTitle.tsx index 0ea158f..cd40bb7 100644 --- a/frontend/src/components/PageTitle.tsx +++ b/frontend/src/components/PageTitle.tsx @@ -3,7 +3,7 @@ const PageTitle = ({ title }: { title: string }) => {

{title}

- ) -} + ); +}; -export default PageTitle; \ No newline at end of file +export default PageTitle; diff --git a/frontend/src/components/Sponsors/SponsorCarousel.tsx b/frontend/src/components/Sponsors/SponsorCarousel.tsx index ea13c4e..a256e47 100644 --- a/frontend/src/components/Sponsors/SponsorCarousel.tsx +++ b/frontend/src/components/Sponsors/SponsorCarousel.tsx @@ -1,4 +1,4 @@ -import { diamondLinks, goldLinks } from "@/../public/data/sponsorInfos"; +import { diamondLinks, goldLinks } from '@/../public/data/sponsorInfos'; import Carousel from 'react-multi-carousel'; import 'react-multi-carousel/lib/styles.css'; @@ -6,20 +6,20 @@ export default function SponsorCarousel() { const responsive = { superLargeDesktop: { breakpoint: { max: 4000, min: 1024 }, - items: 3, + items: 3 }, desktop: { breakpoint: { max: 1024, min: 768 }, - items: 3, + items: 3 }, tablet: { breakpoint: { max: 768, min: 464 }, - items: 2, + items: 2 }, mobile: { breakpoint: { max: 464, min: 0 }, - items: 1, - }, + items: 1 + } }; // Show diamond and gold sponsors in carousel @@ -39,13 +39,9 @@ export default function SponsorCarousel() { > {sponsors.map((sponsor, index) => (
- {sponsor.alt} + {sponsor.alt}
))} ); -} \ No newline at end of file +} diff --git a/frontend/src/components/Sponsors/SponsorModal.tsx b/frontend/src/components/Sponsors/SponsorModal.tsx index a28c1b1..a6062c2 100644 --- a/frontend/src/components/Sponsors/SponsorModal.tsx +++ b/frontend/src/components/Sponsors/SponsorModal.tsx @@ -1,33 +1,33 @@ -import { X } from "lucide-react" -import { useEffect } from "react" -import type { sponsorInfo } from "@/../public/data/sponsorInfos" +import { X } from 'lucide-react'; +import { useEffect } from 'react'; +import type { sponsorInfo } from '@/../public/data/sponsorInfos'; export default function SponsorModal({ sponsorInfo, - setFalse, + setFalse }: { - sponsorInfo: sponsorInfo | null - setFalse: () => void + sponsorInfo: sponsorInfo | null; + setFalse: () => void; }) { // Close modal with Escape key useEffect(() => { const handleEscKey = (event: KeyboardEvent) => { - if (event.key === "Escape") setFalse() - } + if (event.key === 'Escape') setFalse(); + }; - window.addEventListener("keydown", handleEscKey) - return () => window.removeEventListener("keydown", handleEscKey) - }, [setFalse]) + window.addEventListener('keydown', handleEscKey); + return () => window.removeEventListener('keydown', handleEscKey); + }, [setFalse]); if (sponsorInfo === null) { - return null + return null; } return (
{ - if (e.target === e.currentTarget) setFalse() + if (e.target === e.currentTarget) setFalse(); }} > @@ -100,7 +104,12 @@ export default function SponsorModal({ viewBox="0 0 24 24" stroke="currentColor" > - + Close @@ -108,5 +117,5 @@ export default function SponsorModal({
- ) + ); } diff --git a/frontend/src/components/Sponsors/index.tsx b/frontend/src/components/Sponsors/index.tsx index 14ebb1f..e73cff2 100644 --- a/frontend/src/components/Sponsors/index.tsx +++ b/frontend/src/components/Sponsors/index.tsx @@ -13,9 +13,7 @@ const Sponsors = () => {

OUR SPONSORS

-
+
diff --git a/frontend/src/components/Stats.tsx b/frontend/src/components/Stats.tsx index 087050c..c3e067f 100644 --- a/frontend/src/components/Stats.tsx +++ b/frontend/src/components/Stats.tsx @@ -1,92 +1,144 @@ import Image from 'next/image'; -import { motion, useAnimationControls } from "framer-motion" +import { motion, useAnimationControls } from 'framer-motion'; import { useEffect } from 'react'; const Stats = () => { - const r = 80; - const controls = useAnimationControls() + const r = 80; + const controls = useAnimationControls(); - const progress = { - hidden: { pathLength: 0, opacity: 0 }, - visible: { - pathLength: 0.7, - opacity: 1, - transition: { - pathLength: { type: "spring", duration: 1.5, bounce: 0 }, - opacity: { duration: 0.05 } - } - } + const progress = { + hidden: { pathLength: 0, opacity: 0 }, + visible: { + pathLength: 0.7, + opacity: 1, + transition: { + pathLength: { type: 'spring', duration: 1.5, bounce: 0 }, + opacity: { duration: 0.05 } + } } + }; - useEffect(() => { - controls.start("hidden") - controls.start("visible") - controls.stop(); - }, []); + useEffect(() => { + controls.start('hidden'); + controls.start('visible'); + controls.stop(); + }, []); - const revert = async() => { - await controls.start("hidden") - return await controls.start("visible") - } + const revert = async () => { + await controls.start('hidden'); + return await controls.start('visible'); + }; return (
-
- CSESoc Icon - - - - -

CSESoc

-

unsw-computer-science-engineering-society

-
-
{revert()}}> - People - 433 - total members -
-
{revert()}}> - People - 53 - events held -
-
{revert()}}> - People - 343 - subcom -
-
{revert()}}> - People - 343 - subcom -
-{/*
+
+ CSESoc Icon + + + + +

CSESoc

+

unsw-computer-science-engineering-society

+
+
{ + revert(); + }} + > + People + 433 + total members +
+
{ + revert(); + }} + > + People + + 53 + + + events held + +
+
{ + revert(); + }} + > + People + 343 + subcom +
+
{ + revert(); + }} + > + People + 343 + subcom +
+ {/*
53
People @@ -101,8 +153,8 @@ const Stats = () => { People 52 events held
*/} -
-{/*
+
+ {/*
CSESoc Icon
@@ -113,7 +165,7 @@ const Stats = () => {
*/} -{/*
+ {/*
Location Sydney, Australia
@@ -138,70 +190,111 @@ const Stats = () => {

Events held

*/} - -
-
-
-
- People - CSESoc is the principal representative body for UNSW computing students. -
-
- Location - Sydney, Australia -
-
- Mail - info@csesoc.org.au -
-
+
+
+
+
+ People + + CSESoc is the principal representative body for UNSW computing students. + +
+
+ Location + Sydney, Australia +
+
+ Mail + info@csesoc.org.au +
+
-
-
-
-

- csesoc/README.md -

-

- 1   CSESoc is one of the biggest and most active societies at
- 2   UNSW, catering to over 3500 CSE students spanning across
- 3   degrees in Computer Science, Software Engineering,
- 4   Bioinformatics and Computer Engineering. -

- 5   We are here to fulfil the social, personal and professional
- 6   needs of CSE students, and promote computing through a
- 7   variety of forms. -

-
-
- - - -
-
-
-
-

- execs-directors-subcoms.md -

-

- 1   100+ events (35+ careers related revents)
- 2   41 sponsors
- 3   480 000 discord messages
- 4   200+ volunteers.
- 5   Tiktok: 27.2k views, 2k+ likes
- 6   Podcast: 10k downloads, 600+ average viewers
- 7   500+ high school students reached. -

-
-
- - - -
-
+
+
+
+

+ csesoc/README.md +

+

+ 1    + + CSESoc is one of the biggest and most active societies at + +
+ 2   UNSW, catering to over 3500 CSE students spanning across +
+ 3   degrees in Computer Science, Software Engineering, +
+ 4   Bioinformatics and Computer Engineering. +
+
+ 5   We are here to fulfil the social, personal and professional +
+ 6   needs of CSE students, and promote computing through a
7 +   variety of forms. +

+
+
+ + + +
+
+
+
+

+ execs-directors-subcoms.md +

+

+ 1    + 100+ events (35+ careers related revents) +
+ 2   41 sponsors +
+ 3   480 000 discord messages +
+ 4   200+ volunteers. +
+ 5   Tiktok: 27.2k views, 2k+ likes +
+ 6   Podcast: 10k downloads, 600+ average viewers +
7   500+ high school students reached. +

+
+
+ + + +
+
); }; diff --git a/frontend/src/components/Terminal.tsx b/frontend/src/components/Terminal.tsx index e143021..b93b9b8 100644 --- a/frontend/src/components/Terminal.tsx +++ b/frontend/src/components/Terminal.tsx @@ -1,8 +1,8 @@ -import { useRouter } from "next/router"; -import { useEffect, useRef, useState } from "react"; +import { useRouter } from 'next/router'; +import { useEffect, useRef, useState } from 'react'; const Terminal = () => { - const [value, setValue] = useState(""); + const [value, setValue] = useState(''); const [inputFocused, setInputFocused] = useState(false); const inputRef = useRef(null); @@ -19,8 +19,8 @@ const Terminal = () => { // Use localStorage to keep focus on the terminal if redirecting using terminal useEffect(() => { - if (localStorage.getItem("fromTerminal") === "true") { - localStorage.removeItem("fromTerminal"); + if (localStorage.getItem('fromTerminal') === 'true') { + localStorage.removeItem('fromTerminal'); if (inputRef.current) { inputRef.current.focus(); setInputEnd(); @@ -30,54 +30,57 @@ const Terminal = () => { }, []); const goToPage = (target: string) => { - localStorage.setItem("fromTerminal", "true"); + localStorage.setItem('fromTerminal', 'true'); router.push(target); }; // Checking for "Enter" and if so, changing to // the inputted page const handleKey = (key: string) => { - if (key !== "Enter") return; + if (key !== 'Enter') return; const cmd = value.toLowerCase().trim(); - if (["~", "cd", "cd ~", "cd .."].includes(cmd)) { - goToPage("/"); - } else if (["cd about", "cd about us", "cd about_us"].includes(cmd)) { - goToPage("/about"); - } else if (["cd events", "cd event"].includes(cmd)) { - goToPage("/events"); - } else if (["cd resources", "cd resource"].includes(cmd)) { - goToPage("/resources"); - } else if (["cd sponsors", "cd sponsor"].includes(cmd)) { - goToPage("/sponsors"); - } else if (["cd contact", "cd contacts", "cd contact us", "cd contact_us"].includes(cmd)) { - goToPage("/contact-us"); - } else if (cmd === "cd constitution") { - goToPage("/about/constitution"); + if (['~', 'cd', 'cd ~', 'cd ..'].includes(cmd)) { + goToPage('/'); + } else if (['cd about', 'cd about us', 'cd about_us'].includes(cmd)) { + goToPage('/about'); + } else if (['cd events', 'cd event'].includes(cmd)) { + goToPage('/events'); + } else if (['cd resources', 'cd resource'].includes(cmd)) { + goToPage('/resources'); + } else if (['cd sponsors', 'cd sponsor'].includes(cmd)) { + goToPage('/sponsors'); + } else if (['cd contact', 'cd contacts', 'cd contact us', 'cd contact_us'].includes(cmd)) { + goToPage('/contact-us'); + } else if (cmd === 'cd constitution') { + goToPage('/about/constitution'); } else if ( - ["cd execs", "cd directors", "cd subcom", "cd execs directors subcom", "cd execs-directors-subcom", "cd execs_directors_subcom"].includes(cmd) + [ + 'cd execs', + 'cd directors', + 'cd subcom', + 'cd execs directors subcom', + 'cd execs-directors-subcom', + 'cd execs_directors_subcom' + ].includes(cmd) ) { - goToPage("/about/execs-directors-subcom"); + goToPage('/about/execs-directors-subcom'); + } else if (['history', 'cd our history', 'cd our-history', 'cd our_history'].includes(cmd)) { + goToPage('/about/our-history'); } else if ( - ["history", "cd our history", "cd our-history", "cd our_history"].includes(cmd) + ['cd faq', 'cd faqs', 'cd questions', 'cd frequently asked questions'].includes(cmd) ) { - goToPage("/about/our-history"); - } else if ( - ["cd faq", "cd faqs", "cd questions", "cd frequently asked questions"].includes(cmd) - ) { - goToPage("/about/faqs"); - } else if ( - ["cd election-guide", "cd election guide", "cd election"].includes(cmd) - ) { - goToPage("/about/election-guide"); + goToPage('/about/faqs'); + } else if (['cd election-guide', 'cd election guide', 'cd election'].includes(cmd)) { + goToPage('/about/election-guide'); } clearInput(); }; const clearInput = () => { - setValue(""); + setValue(''); }; return ( @@ -101,13 +104,11 @@ const Terminal = () => { }} /> - - {value} - + {value} _ diff --git a/frontend/src/components/ui/dropdown-menu.tsx b/frontend/src/components/ui/dropdown-menu.tsx index e804bca..b3b293d 100644 --- a/frontend/src/components/ui/dropdown-menu.tsx +++ b/frontend/src/components/ui/dropdown-menu.tsx @@ -1,32 +1,32 @@ -import * as React from "react" -import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu" -import { Check, ChevronRight, Circle } from "lucide-react" +import * as React from 'react'; +import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; +import { Check, ChevronRight, Circle } from 'lucide-react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const DropdownMenu = DropdownMenuPrimitive.Root +const DropdownMenu = DropdownMenuPrimitive.Root; -const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger +const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; -const DropdownMenuGroup = DropdownMenuPrimitive.Group +const DropdownMenuGroup = DropdownMenuPrimitive.Group; -const DropdownMenuPortal = DropdownMenuPrimitive.Portal +const DropdownMenuPortal = DropdownMenuPrimitive.Portal; -const DropdownMenuSub = DropdownMenuPrimitive.Sub +const DropdownMenuSub = DropdownMenuPrimitive.Sub; -const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup +const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup; const DropdownMenuSubTrigger = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, children, ...props }, ref) => ( -)) -DropdownMenuSubTrigger.displayName = - DropdownMenuPrimitive.SubTrigger.displayName +)); +DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName; const DropdownMenuSubContent = React.forwardRef< React.ElementRef, @@ -45,14 +44,13 @@ const DropdownMenuSubContent = React.forwardRef< -)) -DropdownMenuSubContent.displayName = - DropdownMenuPrimitive.SubContent.displayName +)); +DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName; const DropdownMenuContent = React.forwardRef< React.ElementRef, @@ -63,33 +61,33 @@ const DropdownMenuContent = React.forwardRef< ref={ref} sideOffset={sideOffset} className={cn( - "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", - "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", + 'z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md', + 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]', className )} {...props} /> -)) -DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName +)); +DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; const DropdownMenuItem = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( svg]:size-4 [&>svg]:shrink-0", - inset && "pl-8", + 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0', + inset && 'pl-8', className )} {...props} /> -)) -DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName +)); +DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; const DropdownMenuCheckboxItem = React.forwardRef< React.ElementRef, @@ -98,7 +96,7 @@ const DropdownMenuCheckboxItem = React.forwardRef< {children} -)) -DropdownMenuCheckboxItem.displayName = - DropdownMenuPrimitive.CheckboxItem.displayName +)); +DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName; const DropdownMenuRadioItem = React.forwardRef< React.ElementRef, @@ -122,7 +119,7 @@ const DropdownMenuRadioItem = React.forwardRef< {children} -)) -DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName +)); +DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName; const DropdownMenuLabel = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName +)); +DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; const DropdownMenuSeparator = React.forwardRef< React.ElementRef, @@ -161,24 +154,18 @@ const DropdownMenuSeparator = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName +)); +DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; -const DropdownMenuShortcut = ({ - className, - ...props -}: React.HTMLAttributes) => { +const DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes) => { return ( - - ) -} -DropdownMenuShortcut.displayName = "DropdownMenuShortcut" + + ); +}; +DropdownMenuShortcut.displayName = 'DropdownMenuShortcut'; export { DropdownMenu, @@ -195,5 +182,5 @@ export { DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, - DropdownMenuRadioGroup, -} + DropdownMenuRadioGroup +}; diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts index bd0c391..2819a83 100644 --- a/frontend/src/lib/utils.ts +++ b/frontend/src/lib/utils.ts @@ -1,6 +1,6 @@ -import { clsx, type ClassValue } from "clsx" -import { twMerge } from "tailwind-merge" +import { clsx, type ClassValue } from 'clsx'; +import { twMerge } from 'tailwind-merge'; export function cn(...inputs: ClassValue[]) { - return twMerge(clsx(inputs)) + return twMerge(clsx(inputs)); } diff --git a/frontend/src/pages/404.tsx b/frontend/src/pages/404.tsx index a97c9c7..6ebd497 100644 --- a/frontend/src/pages/404.tsx +++ b/frontend/src/pages/404.tsx @@ -30,6 +30,5 @@ export default function Custom404() {