refactor: Remove unnecessary output property in next.config.js
This commit is contained in:
@@ -4,11 +4,9 @@ import "./globals.css";
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
import StyledComponentsRegistry from "@/lib/styled-components-registry";
|
||||
import {NextIntlClientProvider} from 'next-intl';
|
||||
import {unstable_setRequestLocale} from 'next-intl/server';
|
||||
import Footer from "@/components/footer";
|
||||
import { Navigation } from "@/components/navigation";
|
||||
import { notFound } from "next/navigation";
|
||||
import {routing} from '@/i18n/routing';
|
||||
import { getMessages } from "next-intl/server";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
@@ -18,29 +16,14 @@ export const metadata: Metadata = {
|
||||
keywords: ["Zen", "Browser", "Zen Browser", "Web", "Internet", "Fast"],
|
||||
};
|
||||
|
||||
const SUPPORTED_LANGUAGES = ["en", "de"];
|
||||
|
||||
async function getMessages(locale: string) {
|
||||
try {
|
||||
return (await import(`../../../messages/${locale}.json`)).default
|
||||
} catch (error) {
|
||||
notFound()
|
||||
}
|
||||
}
|
||||
|
||||
export function generateStaticParams() {
|
||||
return routing.locales.map((locale) => ({locale}));
|
||||
}
|
||||
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
params: {locale},
|
||||
params: {locale}
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
params: {locale: string};
|
||||
}>) {
|
||||
unstable_setRequestLocale(locale);
|
||||
const messages = await getMessages(locale);
|
||||
const messages = await getMessages();
|
||||
|
||||
return (
|
||||
<html lang={locale} suppressHydrationWarning>
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
import { BrandingAssets } from "@/components/branding-assets";
|
||||
import Footer from "@/components/footer";
|
||||
import { Navigation } from "@/components/navigation";
|
||||
|
||||
export const runtime = 'edge'
|
||||
|
||||
export default function NotFoundPage() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user