Skip to content

Commit

Permalink
Simple FAQ component (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
portdeveloper authored Aug 5, 2024
1 parent d8e63b2 commit c5c3ae5
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Link from "next/link";
import type { NextPage } from "next";
import { useAccount } from "wagmi";
import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline";
import { Faq } from "~~/components/extensions-hackathon/Faq";
import { Address } from "~~/components/scaffold-eth";

const Home: NextPage = () => {
Expand Down Expand Up @@ -63,6 +64,7 @@ const Home: NextPage = () => {
</div>
</div>
</div>
<Faq />
</div>
</>
);
Expand Down
44 changes: 44 additions & 0 deletions packages/nextjs/components/extensions-hackathon/Faq.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const faqData = [
{
question: "What's SE-2?",
answer:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
},
{
question: "What are SE-2 extensions?",
answer:
"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
},
{
question: "What do I have to do to participate?",
answer:
"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
},
{
question: "Are there any rules for the extension?",
answer:
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam. Eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.",
},
{
question: "What makes a good extension?",
answer:
"Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit.",
},
];

export const Faq = () => {
return (
<div className="flex flex-col items-center w-1/2">
<h2 className="text-2xl font-bold mb-4">Frequently Asked Questions</h2>
{faqData.map((item, index) => (
<div key={index} tabIndex={0} className="collapse collapse-arrow border-base-300 bg-base-100 border mb-2">
<input type="checkbox" />
<div className="collapse-title text-xl font-medium">{item.question}</div>
<div className="collapse-content">
<p>{item.answer}</p>
</div>
</div>
))}
</div>
);
};

0 comments on commit c5c3ae5

Please sign in to comment.