- Font optimization: Replace @font-face with next/font/google (DM Sans, Inter) for faster font loading and no render-blocking - Image optimization: Add Unsplash to remotePatterns, configure AVIF/WebP formats, add device/image sizes - Convert native <img> tags to next/image with proper sizing and priority for LCP images - Add optimizePackageImports for lucide-react and framer-motion to reduce bundle size - Fix CLS: Urgency message uses fixed min-height instead of animated height - Fix CLS: ProductCard quick-add button uses opacity instead of translate for hover - Convert HeroVideo scroll indicator to CSS animation - Script loading: Rybbit uses lazyOnload strategy for better INP
70 lines
1.8 KiB
TypeScript
70 lines
1.8 KiB
TypeScript
import "./globals.css";
|
|
import type { Metadata, Viewport } from "next";
|
|
import { DM_Sans, Inter } from "next/font/google";
|
|
import ErrorBoundary from "@/components/providers/ErrorBoundary";
|
|
import { SUPPORTED_LOCALES } from "@/lib/i18n/locales";
|
|
import { OrganizationSchema } from "@/components/seo";
|
|
|
|
const dmSans = DM_Sans({
|
|
subsets: ["latin"],
|
|
variable: "--font-display",
|
|
display: "swap",
|
|
});
|
|
|
|
const inter = Inter({
|
|
subsets: ["latin"],
|
|
variable: "--font-body",
|
|
display: "swap",
|
|
});
|
|
|
|
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://manoonoils.com";
|
|
|
|
export const metadata: Metadata = {
|
|
title: {
|
|
default: "ManoonOils - Premium Natural Oils for Hair & Skin",
|
|
template: "%s | ManoonOils",
|
|
},
|
|
description: "Discover our premium collection of natural oils for hair and skin care.",
|
|
robots: "index, follow",
|
|
alternates: {
|
|
canonical: baseUrl,
|
|
languages: Object.fromEntries(
|
|
SUPPORTED_LOCALES.map((locale) => [locale, locale === "sr" ? baseUrl : `${baseUrl}/${locale}`])
|
|
),
|
|
},
|
|
openGraph: {
|
|
title: "ManoonOils - Premium Natural Oils for Hair & Skin",
|
|
description: "Discover our premium collection of natural oils for hair and skin care.",
|
|
type: "website",
|
|
locale: "en_US",
|
|
},
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
maximumScale: 5,
|
|
};
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<html suppressHydrationWarning className={`${dmSans.variable} ${inter.variable}`}>
|
|
<body className="antialiased" suppressHydrationWarning>
|
|
<ErrorBoundary>
|
|
{children}
|
|
</ErrorBoundary>
|
|
<OrganizationSchema
|
|
baseUrl={baseUrl}
|
|
locale="sr"
|
|
logoUrl={`${baseUrl}/logo.png`}
|
|
email="info@manoonoils.com"
|
|
/>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|