import React from 'react'; import { getFAQSchema } from '@/lib/schema'; import JsonLd from '@/components/JsonLd'; export interface FAQItem { question: string; answer: string; } interface FaqBlockProps { title?: string; subtitle?: string; questions: FAQItem[]; } export const FaqBlock: React.FC = ({ title = "Häufig gestellte Fragen", subtitle, questions }) => { if (!questions || questions.length === 0) return null; return (
{subtitle && ( {subtitle} )}

{title}

{questions.map((item, index) => (
{item.question}
{/* Parse simple HTML or just text if answer has formatting */}
))}
{/* Inject FAQ Schema automatically */}
); };