feat: complete migration to static MDX, stabilize local infrastructure and fix i18n issues
Some checks failed
🚀 Build & Deploy / 🔍 Prepare (push) Successful in 4s
🚀 Build & Deploy / 🚀 Deploy (push) Has been cancelled
🚀 Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
🚀 Build & Deploy / 🏗️ Build (push) Has been cancelled
🚀 Build & Deploy / 🔔 Notify (push) Has been cancelled
🚀 Build & Deploy / 🧪 QA (push) Has been cancelled
Some checks failed
🚀 Build & Deploy / 🔍 Prepare (push) Successful in 4s
🚀 Build & Deploy / 🚀 Deploy (push) Has been cancelled
🚀 Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
🚀 Build & Deploy / 🏗️ Build (push) Has been cancelled
🚀 Build & Deploy / 🔔 Notify (push) Has been cancelled
🚀 Build & Deploy / 🧪 QA (push) Has been cancelled
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import React from "react";
|
||||
import { Metadata } from "next";
|
||||
import { notFound } from "next/navigation";
|
||||
import HomeContent from "@/components/HomeContent";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@@ -7,6 +9,24 @@ export const metadata: Metadata = {
|
||||
"Ihr spezialisierter Partner für herstellerneutrale technische Beratung und Projektbegleitung bei Energiekabelprojekten bis 110 kV.",
|
||||
};
|
||||
|
||||
export default function Page() {
|
||||
return <HomeContent />;
|
||||
interface PageProps {
|
||||
params: Promise<{ locale: string }>;
|
||||
}
|
||||
|
||||
export default async function Page({ params }: PageProps) {
|
||||
const { locale } = await params;
|
||||
|
||||
// Dynamically import the MDX content based on locale
|
||||
let Content: React.ComponentType;
|
||||
try {
|
||||
const mdx = await import(`@/content/${locale}/index.mdx`);
|
||||
Content = mdx.default;
|
||||
} catch (e) {
|
||||
// Fallback if MDX is not yet created for this locale
|
||||
return <HomeContent />;
|
||||
}
|
||||
|
||||
// Render the MDX content.
|
||||
// We can use mdx-components.tsx to map MDX tags to our high-fidelity sections.
|
||||
return <Content />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user