i18n by next-intl
This commit is contained in:
62
frontend/src/app/[locale]/layout.tsx
Normal file
62
frontend/src/app/[locale]/layout.tsx
Normal file
@@ -0,0 +1,62 @@
|
||||
import "@/styles/globals.css";
|
||||
import { Metadata } from "next";
|
||||
import { siteConfig } from "@/config/site";
|
||||
import { fontSans } from "@/config/fonts";
|
||||
import { Providers } from "./providers";
|
||||
import { Navbar } from "@/components/navbar";
|
||||
import clsx from "clsx";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
default: siteConfig.name,
|
||||
template: `%s - ${siteConfig.name}`,
|
||||
},
|
||||
description: siteConfig.description,
|
||||
themeColor: [
|
||||
{ media: "(prefers-color-scheme: light)", color: "white" },
|
||||
{ media: "(prefers-color-scheme: dark)", color: "black" },
|
||||
],
|
||||
icons: {
|
||||
icon: "/favicon/favicon.ico",
|
||||
shortcut: "/favicon/favicon-16x16.png",
|
||||
apple: "/favicon/apple-touch-icon.png",
|
||||
},
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
params: {locale}
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: {locale: string};
|
||||
}) {
|
||||
return (
|
||||
<html lang={locale} suppressHydrationWarning>
|
||||
<head />
|
||||
<body
|
||||
className={clsx(
|
||||
"min-h-[calc(100vh-64px)] bg-background font-sans antialiased",
|
||||
fontSans.variable
|
||||
)}
|
||||
>
|
||||
<Providers themeProps={{ attribute: "class", defaultTheme: "dark" }}>
|
||||
<div className="relative flex flex-col min-h-screen light:bg-neutral-50 dark:bg-neutral-800">
|
||||
<Navbar />
|
||||
<main>{children}</main>
|
||||
{/* <footer className="w-full flex items-center justify-center py-3">
|
||||
<Link
|
||||
isExternal
|
||||
className="flex items-center gap-1 text-current"
|
||||
href="https://nextui-docs-v2.vercel.app?utm_source=next-app-template"
|
||||
title="nextui.org homepage"
|
||||
>
|
||||
<span className="text-default-600">Powered by</span>
|
||||
<p className="text-primary">NextUI</p>
|
||||
</Link>
|
||||
</footer> */}
|
||||
</div>
|
||||
</Providers>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user