diff --git a/app/layout.tsx b/app/layout.tsx index 81e392a..d347dfb 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,33 +1,50 @@ -import type { Metadata } from "next"; -import { Geist, Geist_Mono } from "next/font/google"; -import "./globals.css"; +import type { Metadata } from 'next' +import { Geist, Geist_Mono } from 'next/font/google' +import './globals.css' +import { I18nProvider } from '@/lib/i18n/context' +import { getLocale, loadMessages } from '@/lib/i18n/server' const geistSans = Geist({ - variable: "--font-geist-sans", - subsets: ["latin"], -}); + variable: '--font-geist-sans', + subsets: ['latin'], +}) const geistMono = Geist_Mono({ - variable: "--font-geist-mono", - subsets: ["latin"], -}); + variable: '--font-geist-mono', + subsets: ['latin'], +}) export const metadata: Metadata = { - title: "IMS — HSE Incident Management", - description: "Setia Corporation HSE Incident Management System", -}; + title: 'IMS — HSE Incident Management', + description: 'Setia Corporation HSE Incident Management System', +} -export default function RootLayout({ +export default async function RootLayout({ children, }: Readonly<{ - children: React.ReactNode; + children: React.ReactNode }>) { + const locale = await getLocale() + const messages = await loadMessages(locale) + return ( - {children} + + + + + + {children} + +