Fix ANY types in FAQFull filter

This commit is contained in:
MichalC
2026-09-16 12:35:08 +02:00
parent 9043301da6
commit c2ae27a83b
2 changed files with 3 additions and 3 deletions
@@ -54,12 +54,12 @@ export default async function Page(props: {
let faqSchema: Record<string, any> | null = null;
const faqBlock = layout.find((b: any) => b.blockType === 'faqFull') as FAQFullBlock | undefined;
if (faqBlock && faqBlock.questions) {
const validQuestions = faqBlock.questions.filter((q: any) => !q.isDraft);
const validQuestions = faqBlock.questions.filter((q: NonNullable<FAQFullBlock['questions']>[0]) => !q.isDraft);
if (validQuestions.length > 0) {
faqSchema = {
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": validQuestions.map((q: any) => ({
"mainEntity": validQuestions.map((q: NonNullable<FAQFullBlock['questions']>[0]) => ({
"@type": "Question",
"name": q.question,
"acceptedAnswer": {