mirror of
https://github.com/meshtastic/meshtastic.git
synced 2025-03-05 21:00:08 -08:00
21 lines
477 B
TypeScript
21 lines
477 B
TypeScript
export const FaqStructuredData = ({ faqs }) => {
|
|
const allFaqs = Object.values(faqs).flat();
|
|
|
|
const structuredData = {
|
|
"@context": "https://schema.org",
|
|
"@type": "FAQPage",
|
|
mainEntity: allFaqs.map((faq) => ({
|
|
"@type": "Question",
|
|
name: faq.title,
|
|
acceptedAnswer: {
|
|
"@type": "Answer",
|
|
text: faq.content,
|
|
},
|
|
})),
|
|
};
|
|
|
|
return (
|
|
<script type="application/ld+json">{JSON.stringify(structuredData)}</script>
|
|
);
|
|
};
|