fb
This commit is contained in:
49
app/[lang]/layout.tsx
Normal file
49
app/[lang]/layout.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Oranienbaum, Inter } from "next/font/google";
|
||||
import "../globals.css";
|
||||
import Navbar from "@/components/Navbar";
|
||||
import { getDictionary } from "@/dictionaries/get-dictionary";
|
||||
import Footer from "@/components/Footer";
|
||||
|
||||
const oranienbaum = Oranienbaum({
|
||||
subsets: ["latin", "latin-ext"],
|
||||
weight: ["400"],
|
||||
variable: "--font-oranienbaum",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ["latin", "latin-ext"],
|
||||
variable: "--font-inter",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Ayris - Luxury Accommodation",
|
||||
description: "Experience the ultimate comfort and luxury at Ayris.",
|
||||
};
|
||||
|
||||
export async function generateStaticParams() {
|
||||
return [{ lang: 'en' }, { lang: 'tr' }]
|
||||
}
|
||||
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: Promise<{ lang: string }>;
|
||||
}) {
|
||||
const { lang } = await params;
|
||||
const dict = await getDictionary(lang as 'en' | 'tr');
|
||||
|
||||
return (
|
||||
<html lang={lang} className={`${oranienbaum.variable} ${inter.variable} h-full antialiased`}>
|
||||
<body className="font-sans min-h-full flex flex-col bg-[#FAF7F0] text-[#1A1A1A]">
|
||||
<Navbar lang={lang} dict={dict} />
|
||||
{children}
|
||||
<Footer lang={lang} dict={dict} />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user