diff --git a/components/LandingPage.tsx b/components/LandingPage.tsx
index d93c75a..15d5c54 100644
--- a/components/LandingPage.tsx
+++ b/components/LandingPage.tsx
@@ -1,8 +1,9 @@
import { ArrowRight, Shield, Globe, Lock, Server, Zap, ChevronRight } from "lucide-react";
import Link from 'next/link';
+import { useRouter } from 'next/router';
interface LandingPageProps {
- locale?: 'en' | 'id';
+ locale?: string;
}
const translations = {
@@ -46,9 +47,12 @@ const translations = {
}
};
-export function LandingPage({ locale = 'en' }: LandingPageProps) {
- console.log('LandingPage Locale:', locale);
- const t = translations[locale] || translations.en;
+export function LandingPage({ locale: propLocale }: LandingPageProps) {
+ const { locale: routerLocale, defaultLocale } = useRouter();
+ const currentLocale = (propLocale || routerLocale || defaultLocale || 'en') as 'en' | 'id';
+
+ console.log('LandingPage Final Locale:', currentLocale);
+ const t = translations[currentLocale] || translations.en;
return (
diff --git a/middleware.ts b/middleware.ts
deleted file mode 100644
index 3bd5f95..0000000
--- a/middleware.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-
-import { NextRequest, NextResponse } from 'next/server'
-
-const PUBLIC_FILE = /\.(.*)$/
-
-export function middleware(req: NextRequest) {
- if (
- req.nextUrl.pathname.startsWith('/_next') ||
- req.nextUrl.pathname.includes('/api/') ||
- PUBLIC_FILE.test(req.nextUrl.pathname)
- ) {
- return
- }
-
- if (req.nextUrl.locale === 'default') {
- const locale = req.cookies.get('NEXT_LOCALE')?.value || 'en'
- return NextResponse.redirect(
- new URL(`/${locale}${req.nextUrl.pathname}${req.nextUrl.search}`, req.url)
- )
- }
-}
diff --git a/pages/_meta.en.json b/pages/_meta.json
similarity index 100%
rename from pages/_meta.en.json
rename to pages/_meta.json
diff --git a/pages/developer/_meta.en.json b/pages/developer/_meta.json
similarity index 100%
rename from pages/developer/_meta.en.json
rename to pages/developer/_meta.json
diff --git a/pages/guide/_meta.en.json b/pages/guide/_meta.json
similarity index 100%
rename from pages/guide/_meta.en.json
rename to pages/guide/_meta.json
diff --git a/pages/guide/certificates/_meta.en.json b/pages/guide/certificates/_meta.json
similarity index 100%
rename from pages/guide/certificates/_meta.en.json
rename to pages/guide/certificates/_meta.json
diff --git a/pages/guide/concepts/_meta.en.json b/pages/guide/concepts/_meta.json
similarity index 100%
rename from pages/guide/concepts/_meta.en.json
rename to pages/guide/concepts/_meta.json
diff --git a/pages/guide/getting-started/_meta.en.json b/pages/guide/getting-started/_meta.json
similarity index 100%
rename from pages/guide/getting-started/_meta.en.json
rename to pages/guide/getting-started/_meta.json
diff --git a/pages/guide/integrations/_meta.en.json b/pages/guide/integrations/_meta.json
similarity index 100%
rename from pages/guide/integrations/_meta.en.json
rename to pages/guide/integrations/_meta.json
diff --git a/pages/guide/troubleshooting/_meta.en.json b/pages/guide/troubleshooting/_meta.json
similarity index 100%
rename from pages/guide/troubleshooting/_meta.en.json
rename to pages/guide/troubleshooting/_meta.json
diff --git a/pages/index.id.mdx b/pages/index.id.mdx
deleted file mode 100644
index 2526d5d..0000000
--- a/pages/index.id.mdx
+++ /dev/null
@@ -1,11 +0,0 @@
-import { useRouter } from 'next/router'
-import { LandingPage } from '../components/LandingPage'
-
-export const Index = () => {
- const { locale } = useRouter()
- return
-}
-
-
-
-# DEBUG_ID_FILE_RENDERED