Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple FAQ component #12

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
);
};
Loading