fix(SW-194): cleanup
This commit is contained in:
@@ -18,7 +18,6 @@ export default function AccordionSection({ accordion, title }: AccordionProps) {
|
||||
function handleToggleShowMore() {
|
||||
setAllItemsVisible((previousState) => !previousState)
|
||||
}
|
||||
console.log("PUP", accordion)
|
||||
|
||||
function getClassName(idx: number): string {
|
||||
if (!allItemsVisible && idx > 4) {
|
||||
@@ -28,20 +27,21 @@ export default function AccordionSection({ accordion, title }: AccordionProps) {
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
return (
|
||||
<SectionContainer id="faq">
|
||||
{title && <SectionHeader textTransform="uppercase" title={title} />}
|
||||
<Accordion theme={"light"} variant={"card"}>
|
||||
{accordion.map((acc, idx) => (
|
||||
{accordion.map((acc, idx: number) => (
|
||||
<AccordionItem
|
||||
key={acc.question + idx}
|
||||
title={acc.question}
|
||||
className={getClassName(idx)}
|
||||
>
|
||||
{/*<JsonToHtml
|
||||
<JsonToHtml
|
||||
embeds={acc.answer.embedded_itemsConnection.edges}
|
||||
nodes={acc.answer.json?.children}
|
||||
/>*/}
|
||||
nodes={acc.answer.json?.children[0].children}
|
||||
/>
|
||||
</AccordionItem>
|
||||
))}
|
||||
</Accordion>
|
||||
|
||||
Reference in New Issue
Block a user