Files
tripwithbonus/frontend/components/FAQ.tsx
2025-05-15 19:50:13 +03:00

25 lines
615 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from 'react'
import Accordion from './ui/Accordion'
import { FAQProps } from '@/app/types'
const FAQ: React.FC<FAQProps> = ({ faqs }) => {
if (!faqs || faqs.length === 0) {
return null
}
return (
<div className="w-full max-w-[1250px] mx-auto">
<div className="pl-4 py-5 sticky">
<h2 className="text-3xl font-bold text-center py-4">
Часто задаваемые вопросы:
</h2>
{faqs.map((faq) => (
<Accordion key={faq.id} title={faq.title} content={faq.content} />
))}
</div>
</div>
)
}
export default FAQ