From ee048ef70f65459173e50920f06911ff4e88a0ad Mon Sep 17 00:00:00 2001 From: Damjan Savic Date: Sun, 25 Jan 2026 06:34:31 +0100 Subject: [PATCH] auto-claude: subtask-1-5 - Extract FAQJsonLd component --- .auto-claude-status | 6 ++--- src/components/seo/schemas/FAQJsonLd.tsx | 29 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 src/components/seo/schemas/FAQJsonLd.tsx diff --git a/.auto-claude-status b/.auto-claude-status index e073a3b..b1cbcd7 100644 --- a/.auto-claude-status +++ b/.auto-claude-status @@ -3,7 +3,7 @@ "spec": "032-split-large-jsonld-tsx-component-759-lines-into-se", "state": "building", "subtasks": { - "completed": 3, + "completed": 4, "total": 19, "in_progress": 1, "failed": 0 @@ -18,8 +18,8 @@ "max": 1 }, "session": { - "number": 5, + "number": 6, "started_at": "2026-01-25T06:23:19.101802" }, - "last_update": "2026-01-25T06:32:33.169444" + "last_update": "2026-01-25T06:33:47.759616" } \ No newline at end of file diff --git a/src/components/seo/schemas/FAQJsonLd.tsx b/src/components/seo/schemas/FAQJsonLd.tsx new file mode 100644 index 0000000..f6db9d0 --- /dev/null +++ b/src/components/seo/schemas/FAQJsonLd.tsx @@ -0,0 +1,29 @@ +import { type Locale } from '@/i18n/config'; + +interface FAQItem { + question: string; + answer: string; +} + +export function FAQJsonLd({ items, locale }: { items: FAQItem[]; locale?: Locale }) { + const schema = { + '@context': 'https://schema.org', + '@type': 'FAQPage', + inLanguage: locale ? (locale === 'de' ? 'de-DE' : locale === 'sr' ? 'sr-RS' : 'en-US') : 'de-DE', + mainEntity: items.map((item) => ({ + '@type': 'Question', + name: item.question, + acceptedAnswer: { + '@type': 'Answer', + text: item.answer, + }, + })), + }; + + return ( +