Some checks failed
Build & Deploy KLZ Cables / 🔍 Prepare Environment (push) Successful in 7s
Build & Deploy KLZ Cables / 🧪 Quality Assurance (push) Failing after 1m31s
Build & Deploy KLZ Cables / 🏗️ Build App (push) Successful in 3m51s
Build & Deploy KLZ Cables / 🚀 Deploy (push) Has been skipped
Build & Deploy KLZ Cables / ⚡ PageSpeed (push) Has been skipped
Build & Deploy KLZ Cables / 🔔 Notifications (push) Successful in 2s
61 lines
1.9 KiB
TypeScript
61 lines
1.9 KiB
TypeScript
import Footer from '@/components/Footer';
|
|
import Header from '@/components/Header';
|
|
import JsonLd from '@/components/JsonLd';
|
|
import AnalyticsProvider from '@/components/analytics/AnalyticsProvider';
|
|
import CMSConnectivityNotice from '@/components/CMSConnectivityNotice';
|
|
import { Metadata, Viewport } from 'next';
|
|
import { NextIntlClientProvider } from 'next-intl';
|
|
import { getMessages } from 'next-intl/server';
|
|
import '../../styles/globals.css';
|
|
import { SITE_URL } from '@/lib/schema';
|
|
import { config } from '@/lib/config';
|
|
|
|
export const metadata: Metadata = {
|
|
metadataBase: new URL(SITE_URL),
|
|
icons: {
|
|
icon: [
|
|
{ url: '/favicon.ico', sizes: 'any' },
|
|
{ url: '/logo-blue.svg', type: 'image/svg+xml' },
|
|
],
|
|
apple: [{ url: '/apple-touch-icon.png', sizes: '180x180', type: 'image/png' }],
|
|
},
|
|
};
|
|
|
|
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}>
|
|
<JsonLd />
|
|
<Header />
|
|
<main className="flex-grow animate-fade-in overflow-visible">{children}</main>
|
|
<Footer />
|
|
<CMSConnectivityNotice />
|
|
|
|
{/* Sends pageviews for client-side navigations */}
|
|
<AnalyticsProvider websiteId={config.analytics.umami.websiteId} />
|
|
</NextIntlClientProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|