diff --git a/src/components/Accordion.tsx b/src/components/Accordion.tsx index 0ea1f2d4..e96501a5 100644 --- a/src/components/Accordion.tsx +++ b/src/components/Accordion.tsx @@ -50,7 +50,10 @@ const Accordion: React.FC = ({ sections }) => { href={href} target="_blank" rel="noopener noreferrer" - style={{ fontSize: '0.875rem', textDecoration: 'underline' }} + style={{ + fontSize: '0.875rem', + textDecoration: 'underline', + }} > {part.split('>')[1]} @@ -72,25 +75,33 @@ const Accordion: React.FC = ({ sections }) => { return (
+ {/* !remember to add back the md:grid-cols-2 here */}
+ {/* for each section */} + {/* render the title and the content */} {sections.map((section, sectionIndex) => (
-

+

{section.section}

+ {/* contents of accordion item */} {section.content.map((item, questionIndex) => ( -
+
+ {/* the accordion question */}
toggleAccordion( @@ -103,11 +114,12 @@ const Accordion: React.FC = ({ sections }) => {

{item.question}

- +
{activeIndex && activeIndex.section === sectionIndex && - activeIndex.question === questionIndex ? ( + activeIndex.question === + questionIndex ? ( ) : ( @@ -115,16 +127,19 @@ const Accordion: React.FC = ({ sections }) => {
+ {/* the accordion answer */}
- {parseAnswer(item.answer)} +
+ {parseAnswer(item.answer)} +
))} @@ -132,9 +147,12 @@ const Accordion: React.FC = ({ sections }) => { ))}
-
+
-

Still have a question?

+

+ {' '} + Still have a question?{' '} +

No worries! Reach out to us via email at{' '}