From 5b1a2eff7f554507a6aefef1e124fb26d56bd2fe Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Fri, 7 Aug 2026 12:54:02 +0200 Subject: [PATCH] fix(mdx): handle productTabs in MDXContent to resolve Unknown Block Type --- components/MDXContent.tsx | 3 +++ tests/mdx-content-mapping.test.tsx | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/mdx-content-mapping.test.tsx diff --git a/components/MDXContent.tsx b/components/MDXContent.tsx index e9653862..ecb8ceb1 100644 --- a/components/MDXContent.tsx +++ b/components/MDXContent.tsx @@ -24,6 +24,7 @@ import VideoSection from './home/VideoSection'; import CTA from './home/CTA'; import { AgbHistoryBlock } from './AgbHistoryBlock'; import { PDFDownloadBlock } from './PDFDownloadBlock'; +import ProductTechnicalData from './ProductTechnicalData'; function ContactSection(props: any) { return (
@@ -100,6 +101,8 @@ async function Block(props: any) { return ; case 'pdfDownload': return ; + case 'productTabs': + return ; default: return ( diff --git a/tests/mdx-content-mapping.test.tsx b/tests/mdx-content-mapping.test.tsx new file mode 100644 index 00000000..77d905c6 --- /dev/null +++ b/tests/mdx-content-mapping.test.tsx @@ -0,0 +1,14 @@ +import { describe, it, expect } from 'vitest'; +import * as fs from 'fs'; +import * as path from 'path'; + +describe('MDXContent Mapping', () => { + it('should have productTabs in the switch statement to prevent Unknown Block Type errors', () => { + const filePath = path.join(process.cwd(), 'components/MDXContent.tsx'); + const fileContent = fs.readFileSync(filePath, 'utf-8'); + + // Check if the switch case for productTabs exists + expect(fileContent).toContain("case 'productTabs':"); + expect(fileContent).toContain('