diff --git a/app/(landing)/sections/FAQ/Accordian.tsx b/app/(landing)/sections/FAQ/Accordian.tsx new file mode 100644 index 0000000..bf109a3 --- /dev/null +++ b/app/(landing)/sections/FAQ/Accordian.tsx @@ -0,0 +1,56 @@ +import { useState } from 'react'; + +type propType = { + question: string; + answer: string; +}; + +export default function Accordion(props: propType) { + const [accordionOpen, setAccordionOpen] = useState(false); + + return ( +
+ +
+
{props.answer}
+
+
+
+ ); +} diff --git a/app/(landing)/sections/FAQ/Accordion.tsx b/app/(landing)/sections/FAQ/Accordion.tsx new file mode 100644 index 0000000..bf109a3 --- /dev/null +++ b/app/(landing)/sections/FAQ/Accordion.tsx @@ -0,0 +1,56 @@ +import { useState } from 'react'; + +type propType = { + question: string; + answer: string; +}; + +export default function Accordion(props: propType) { + const [accordionOpen, setAccordionOpen] = useState(false); + + return ( +
+ +
+
{props.answer}
+
+
+
+ ); +} diff --git a/app/(landing)/sections/FAQ/FAQ.tsx b/app/(landing)/sections/FAQ/FAQ.tsx index f402ba0..f1a9bdd 100644 --- a/app/(landing)/sections/FAQ/FAQ.tsx +++ b/app/(landing)/sections/FAQ/FAQ.tsx @@ -1,87 +1,18 @@ 'use client'; - import React from 'react'; -import { Disclosure } from '@headlessui/react'; -import { GoChevronDown } from 'react-icons/go'; import { hackRUFAQ } from '@/app/lib/constants'; - -/** - * TODO: make it so that only one question can be open at a time. - */ - -function Question(props: { question: string; answer: string }) { - const { question, answer } = props; - return ( - - {({ open }) => ( -
- - {question} - - - - {answer} - -
- )} -
- ); -} +import Accordian from './Accordion'; function QuestionContainer() { - const { - whatIsHackRUAnswer, - whatIsApplicationAnswer, - winAnythingAnswer, - maskMandateAnswer, - moreQuestionsAnswer, - whoCanComeAnswer, - newAnswer, - costAnswer, - workWithOthersAnswer, - } = hackRUFAQ; - return ( -
-
-
- - - - - -
-
- - - - -
-
+
+ {Object.keys(hackRUFAQ).map((question: string, i: number) => ( + + ))}
); } @@ -90,11 +21,9 @@ export default function FAQ() { return (
-
+
diff --git a/app/lib/constants.ts b/app/lib/constants.ts index 0b83574..e581712 100644 --- a/app/lib/constants.ts +++ b/app/lib/constants.ts @@ -1,32 +1,31 @@ export const hackRUFAQ = { - whatIsHackRUAnswer: `HackRU is a 24-hour hackathon at Rutgers University. We welcome hundreds of students to join us in building + 'What is HackRU?': `HackRU is a 24-hour hackathon at Rutgers University. We welcome hundreds of students to join us in building awesome software and hardware projects. Industry experts and mentors come from all over the country to create an environment that fosters an atmosphere of learning through teck talks and one-on-one guidance. We encourage beginner and advanced hackers alike to challenge themselves and expand their skills.`, - whatIsApplicationAnswer: `HackRU will be back in person this Fall 2023! We will be accepting anywhere between 300-500 hackers based on + 'What is the application process like?': `HackRU will be back in person this Fall 2023! We will be accepting anywhere between 300-500 hackers based on when you register for the event. After you register, you'll get a notification 1-2 weeks before the hackathon whether we have accepted you or not to the hackathon. You will then have to let us know if you plan on coming or not and then you're all set!`, - winAnythingAnswer: + 'Can I win anything?': "Yes! We'll release more information about prizes as the event draws near.", - maskMandateAnswer: + 'Will there be a mask mandate?': 'No, HackRU will not have a mask mandate but it is encouraged throughout the duration of the event.', - moreQuestionsAnswer: - "Reach out to us at info@hackru.org! We'll be happy to answer.", - - whoCanComeAnswer: `HackRU welcomes undergraduate and graduate students of all majors, backgrounds, and skill level to come create. Additionally, high + 'Who can come?': `HackRU welcomes undergraduate and graduate students of all majors, backgrounds, and skill level to come create. Additionally, high school students who will be 18 by HackRU are allowed to register. Unfortunately, if you are under 18, you will not be able to attend.`, - newAnswer: `That's great! We'd love to have you at HackRU. Throughout the weekend, there will be workshops to get your feet wet, + "I'm new. What should I do?": `That's great! We'd love to have you at HackRU. Throughout the weekend, there will be workshops to get your feet wet, project ideas for you to try out, and mentors to guide you through the process.`, - costAnswer: + 'How much does it cost to attend?': 'Like the best things in life, HackRU is completely free to attend!', - workWithOthersAnswer: `Hackers can(and are encouraged to) work in teams of up to 4 humans max. The knowledge you gain from teammates is + 'Can I work with others?': `Hackers can(and are encouraged to) work in teams of up to 4 humans max. The knowledge you gain from teammates is invaluable, along with the opportunity to build lifetime friendships - you might leave with a new best friend! We will be having a team-building exercise after opening ceremonies for people who are looking for teammates.`, + 'I have more questions!': + "Reach out to us at info@hackru.org! We'll be happy to answer.", }; diff --git a/tailwind.config.ts b/tailwind.config.ts index 890f136..c65feb5 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -7,6 +7,14 @@ const config: Config = { './app/**/*.{js,ts,jsx,tsx,mdx}', ], theme: { + screens: { + xx: '0px', + xs: '320px', + sm: '576px', + md: '768px', + lg: '1024px', + xl: '1280px', + }, extend: { gridTemplateColumns: { '13': 'repeat(13, minmax(0, 1fr))', @@ -14,10 +22,10 @@ const config: Config = { colors: { blue: { 100: '#203437', - 200: '#1B1F23' }, orange: { - 100: '#FFB464' + 100: '#FFB464', + 200: '#1B1F23' } }, },