47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import {NextIntlClientProvider} from 'next-intl';
|
|
import {getMessages} from 'next-intl/server';
|
|
import '../../styles/globals.css';
|
|
import Header from '@/components/Header';
|
|
import Footer from '@/components/Footer';
|
|
import { Metadata, Viewport } from 'next';
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'KLZ Cables',
|
|
description: 'Premium Cable Solutions',
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
width: 'device-width',
|
|
initialScale: 1,
|
|
maximumScale: 1,
|
|
userScalable: false,
|
|
viewportFit: 'cover',
|
|
themeColor: '#001a4d',
|
|
};
|
|
|
|
export default async function LocaleLayout({
|
|
children,
|
|
params: {locale}
|
|
}: {
|
|
children: React.ReactNode;
|
|
params: {locale: string};
|
|
}) {
|
|
// Providing all messages to the client
|
|
// side is the easiest way to get started
|
|
const messages = await getMessages();
|
|
|
|
return (
|
|
<html lang={locale} className="scroll-smooth overflow-x-hidden">
|
|
<body className="flex flex-col min-h-screen font-sans selection:bg-accent selection:text-primary-dark antialiased overflow-x-hidden">
|
|
<NextIntlClientProvider messages={messages} locale={locale}>
|
|
<Header />
|
|
<main className="flex-grow animate-fade-in overflow-visible">
|
|
{children}
|
|
</main>
|
|
<Footer />
|
|
</NextIntlClientProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|