diff --git a/public/hackcamp2023meta.png b/public/hackcamp2023meta.png new file mode 100644 index 00000000..43395976 Binary files /dev/null and b/public/hackcamp2023meta.png differ diff --git a/public/hc-og.png b/public/hc-og.png deleted file mode 100644 index ad8965bb..00000000 Binary files a/public/hc-og.png and /dev/null differ diff --git a/src/components/FaqBox.jsx b/src/components/FaqBox.jsx index cd59360a..ef8f9286 100644 --- a/src/components/FaqBox.jsx +++ b/src/components/FaqBox.jsx @@ -10,10 +10,10 @@ const Container = styled.div` overflow:hidden; ${p => p.expanded -? ` + ? ` border-color: #C4B2F0; ` -: ` + : ` border-color: #C4B2F0; `} @@ -75,15 +75,10 @@ const Arrow = ({ color }) => ( ) -const FaqBox = ({ question, answer }) => { - const [isExpanded, setIsExpanded] = useState(false) - +const FaqBox = ({ question, answer, isExpanded, onExpand }) => { return ( - - setIsExpanded(!isExpanded)}> + + {question} diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 10c88b04..6bd75aef 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -29,7 +29,7 @@ export default function Index ({ title }) { participants can learn new skills, connect with fellow tech enthusiasts, and build solutions to tackle challenges together." /> - + {/* Components Starts */} diff --git a/src/sections/Faq.jsx b/src/sections/Faq.jsx index 65bc6f2f..cfa9a159 100644 --- a/src/sections/Faq.jsx +++ b/src/sections/Faq.jsx @@ -57,7 +57,7 @@ const bobbing = keyframes` 50% { transform: translateY(-20px); } -`; +` const Nugget = styled.div` background: url('assets/background/faq/nugget.png') no-repeat; @@ -211,16 +211,31 @@ display:none; } ` -const FaqCollection = ({ category, faqs }) => ( +const FaqCollection = ({ category, faqs, expandedQuestion, setExpandedQuestion }) => ( {category} - {faqs.map(q => )} + {faqs.map(q => + { + if (expandedQuestion === q.question) { + setExpandedQuestion(null) + } else { + setExpandedQuestion(q.question) + } + }} + /> + )} ) const Faq = () => { const [faqData, setFaqData] = useState(null) + const [expandedQuestion, setExpandedQuestion] = useState(null) // (@htdf processData) // (@signature (listof FAQ) -> Object) @@ -249,7 +264,7 @@ const Faq = () => { - + FAQ @@ -258,24 +273,30 @@ const Faq = () => { {faqData ? ( - {faqData.General && - + } - {faqData["Teams & Projects"] && - + {faqData['Teams & Projects'] && + } {faqData.Logistics && - + } - ) + ) : 'loading...'} diff --git a/src/sections/Learn.jsx b/src/sections/Learn.jsx index 79f17e84..10b738b8 100644 --- a/src/sections/Learn.jsx +++ b/src/sections/Learn.jsx @@ -176,7 +176,7 @@ const StyledText = styled.div` z-index:4; ${(p) => p.theme.mediaQueries.mobile} { - flex-direction: column-reverse; + flex-direction: column; align-items: center; margin-top: 55vw; gap: 80vw;