diff --git a/app/[locale]/agb/page.tsx b/app/[locale]/agb/page.tsx
index 44d36b7..ad4e8ea 100644
--- a/app/[locale]/agb/page.tsx
+++ b/app/[locale]/agb/page.tsx
@@ -1,112 +1,37 @@
+import React from "react";
import { Download } from "lucide-react";
-import fs from "fs";
-import path from "path";
+import { notFound } from "next/navigation";
+import { LegalLayout } from "@/components/LegalLayout";
-export default function AVB() {
- const filePath = path.join(process.cwd(), "context/avbs.md");
- const fileContent = fs.readFileSync(filePath, "utf8");
+interface PageProps {
+ params: Promise<{ locale: string }>;
+}
- // Split by double newlines to get major blocks
- const rawBlocks = fileContent
- .split(/\n\s*\n/)
- .map((b) => b.trim())
- .filter((b) => b !== "");
+export default async function Page({ params }: PageProps) {
+ const { locale } = await params;
- // Extract title and stand more robustly
- const title =
- rawBlocks.find((b) => b.startsWith("# "))?.replace(/^#\s+/, "") ||
- "Allgemeine Verkaufsbedingungen";
- const stand =
- rawBlocks.find((b) => b.toLowerCase().startsWith("stand:")) ||
- "Stand: April 2026";
+ let Content: React.ComponentType;
+ try {
+ const mdx = await import(`@/content/${locale}/avb.mdx`);
+ Content = mdx.default;
+ } catch (e) {
+ notFound();
+ }
- const sections: { title: string; content: string[] }[] = [];
- let currentSection: { title: string; content: string[] } | null = null;
-
- // Process sections, skipping title and stand blocks
- rawBlocks.forEach((block) => {
- if (block.startsWith("# ") || block.toLowerCase().startsWith("stand:"))
- return;
-
- if (block.startsWith("##")) {
- // New section header: e.g. "## 1. Geltungsbereich"
- if (currentSection) sections.push(currentSection);
- currentSection = {
- title: block.replace(/^##\s+/, "").trim(),
- content: [],
- };
- } else if (currentSection) {
- // Clean up bold markers for better display
- const cleanedBlock = block.replace(/\*\*(.*?)\*\*/g, "$1");
- currentSection.content.push(cleanedBlock);
- }
- });
- if (currentSection) sections.push(currentSection);
-
- // The very last block might be a footer/schlussbestimmung if it's not in a section
- // In our MD, everything is in a section, so we just use the last block of the last section as potential footer if we want,
- // but the current UI expects a separate 'footer' variable.
- const footer = "MB Grid Solutions & Services";
+ const downloadButton = (
+
+
{stand}
-- {paragraph.split(/(\[.*?\]\(.*?\))/g).map((part, i) => { - const match = part.match(/\[(.*?)\]\((.*?)\)/); - if (match) { - return ( - - {match[1]} - - ); - } - return part; - })} -
- ))} -{footer}
-{stand}
-- Wir nehmen den Schutz Ihrer persönlichen Daten sehr ernst. Wir - behandeln Ihre personenbezogenen Daten vertraulich und - entsprechend der gesetzlichen Datenschutzvorschriften sowie - dieser Datenschutzerklärung. -
-- Unsere Website wird bei Hetzner Online GmbH gehostet. Der - Serverstandort ist Deutschland. Wir haben einen Vertrag über - Auftragsverarbeitung (AVV) mit Hetzner geschlossen. -
-- Wenn Sie uns per Kontaktformular Anfragen zukommen lassen, - werden Ihre Angaben aus dem Anfrageformular inklusive der von - Ihnen dort angegebenen Kontaktdaten zwecks Bearbeitung der - Anfrage und für den Fall von Anschlussfragen bei uns - gespeichert. Diese Daten geben wir nicht ohne Ihre Einwilligung - weiter. -
-- Der Provider der Seiten erhebt und speichert automatisch - Informationen in sogenannten Server-Log-Dateien, die Ihr Browser - automatisch an uns übermittelt. Dies sind: Browsertyp und - Browserversion, verwendetes Betriebssystem, Referrer URL, - Hostname des zugreifenden Rechners, Uhrzeit der Serveranfrage, - IP-Adresse. -
-
- MB Grid Solutions & Services GmbH
-
- Raiffeisenstraße 22
-
- 73630 Remshalden
-
- Michael Bodemer
-
- Klaus Mintel
-
- E-Mail:{" "}
-
- info@mb-grid-solutions.com
-
-
- Web:{" "}
-
- www.mb-grid-solutions.com
-
-
- Eintragung im Handelsregister.
-
- Registergericht: Amtsgericht Stuttgart
-
- Registernummer: HRB 803379
-
- Alle auf der Website veröffentlichten Texte, Bilder und - sonstigen Informationen unterliegen – sofern nicht anders - gekennzeichnet – dem Urheberrecht. Jede Vervielfältigung, - Verbreitung, Speicherung, Übermittlung, Wiedergabe bzw. - Weitergabe der Inhalte ohne schriftliche Genehmigung ist - ausdrücklich untersagt. -
-