Explore the usage of the FAQ
component to provide answers to frequently asked questions in your Next.js applications.
The FAQ
component is used to display a list of questions and answers. It helps in managing how information is displayed to the user, ensuring a clean and organized UI.
1 import FAQ from '@/shared/component/FAQ';
2
3 <FAQ />
The data for the FAQ is structured in an array of objects, each containing a question
and an answer
. This makes it easy to add, remove or modify the FAQs as needed.
1 const faqData = [
2 {
3 question: 'What payment methods do you accept?',
4 answer: 'We accept all major credit cards, PayPal, and bank transfers.',
5 },
6 // Add more FAQs here
7 ];