Skip to content

Commit

Permalink
faq stateg
Browse files Browse the repository at this point in the history
  • Loading branch information
lassejaco committed Mar 21, 2024
1 parent 54373cb commit 1687e7f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions devcon/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export default pageHOC(function Index(props: any) {
const isInView = useInView(scrollRef, { once: true, margin: '40% 0px -20% 0px' })
const [video, setVideo] = React.useState(videos[0])
const [calendarModalOpen, setCalendarModalOpen] = React.useState(false)
const [openFAQ, setOpenFAQ] = React.useState<string | null>(null)

const [cal, setCal] = React.useState<any>(null)

Expand Down Expand Up @@ -463,13 +464,13 @@ export default pageHOC(function Index(props: any) {
),
},
].map(({ question, answer }) => {
const [open, setOpen] = React.useState(false)
const open = question === openFAQ

return (
<div key={question} className="w-full border-[#E2E3FF] bg-[#F8F9FE] rounded-xl shadow mb-4 ">
<div
className="w-full p-4 bold cursor-pointer select-none hover:opacity-95"
onClick={() => setOpen(!open)}
onClick={() => setOpenFAQ(open ? null : question)}
>
{question}
</div>
Expand Down

0 comments on commit 1687e7f

Please sign in to comment.