first commit
This commit is contained in:
33
src/app/layout.tsx
Normal file
33
src/app/layout.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import type {Metadata} from "next";
|
||||
import "./globals.css";
|
||||
import {FontVazir} from "@/config/font.config";
|
||||
import TopMenu from "@/ui/components/top-menu/TopMenu";
|
||||
export async function generateStaticParams() {
|
||||
return [{lang: "en"}, {lang: "fa"}];
|
||||
}
|
||||
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
params,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
params: Promise<{lang: "en" | "fa"}>;
|
||||
}>) {
|
||||
return (
|
||||
<html lang={(await params).lang} dir="rtl">
|
||||
<body
|
||||
className={`${FontVazir.variable} antialiased`}
|
||||
style={{fontFamily: FontVazir.style.fontFamily}}
|
||||
>
|
||||
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user