117 lines
3.2 KiB
TypeScript
117 lines
3.2 KiB
TypeScript
import type React from "react"
|
|
import type { Metadata } from "next"
|
|
import { Inter, Geist_Mono } from "next/font/google"
|
|
import { Header } from "@/components/header"
|
|
import { Footer } from "@/components/footer"
|
|
import { SiteChatWidget } from "@/components/site-chat-widget"
|
|
import { CartProvider } from "@/lib/cart/context"
|
|
import { businessConfig } from "@/lib/seo-config"
|
|
import "./globals.css"
|
|
|
|
const inter = Inter({
|
|
subsets: ["latin"],
|
|
variable: "--font-inter",
|
|
display: "swap",
|
|
})
|
|
const geistMono = Geist_Mono({
|
|
subsets: ["latin"],
|
|
variable: "--font-geist-mono",
|
|
display: "swap",
|
|
})
|
|
|
|
export const metadata: Metadata = {
|
|
metadataBase: new URL(businessConfig.website),
|
|
title: {
|
|
default: businessConfig.name,
|
|
template: "%s",
|
|
},
|
|
description: businessConfig.description,
|
|
generator: "Next.js",
|
|
authors: [{ name: businessConfig.name }],
|
|
creator: businessConfig.name,
|
|
publisher: businessConfig.name,
|
|
robots: {
|
|
index: true,
|
|
follow: true,
|
|
googleBot: {
|
|
index: true,
|
|
follow: true,
|
|
"max-video-preview": -1,
|
|
"max-image-preview": "large",
|
|
"max-snippet": -1,
|
|
},
|
|
},
|
|
icons: {
|
|
icon: [
|
|
{
|
|
url: "/favicon-16x16.png",
|
|
sizes: "16x16",
|
|
type: "image/png",
|
|
},
|
|
{
|
|
url: "/favicon-32x32.png",
|
|
sizes: "32x32",
|
|
type: "image/png",
|
|
},
|
|
],
|
|
shortcut: "/favicon.ico",
|
|
apple: "/apple-touch-icon.png",
|
|
},
|
|
openGraph: {
|
|
type: "website",
|
|
locale: "en_US",
|
|
siteName: businessConfig.name,
|
|
images: [
|
|
{
|
|
url: `${businessConfig.website}/images/rocky-mountain-vending-service-area-926x1024.webp`,
|
|
width: 926,
|
|
height: 1024,
|
|
alt: "Rocky Mountain Vending Service Area",
|
|
},
|
|
],
|
|
},
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
images: [
|
|
`${businessConfig.website}/images/rocky-mountain-vending-service-area-926x1024.webp`,
|
|
],
|
|
creator: "@RMVVending",
|
|
},
|
|
verification: {
|
|
// Google Search Console verification
|
|
// To enable: Add your verification code from Google Search Console
|
|
// Format: google: "your-verification-code-here"
|
|
// Get your code from: https://search.google.com/search-console
|
|
// google: process.env.GOOGLE_SITE_VERIFICATION || undefined,
|
|
},
|
|
}
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode
|
|
}>) {
|
|
return (
|
|
<html lang="en" className={`${inter.variable} ${geistMono.variable}`}>
|
|
<body className="font-sans antialiased">
|
|
<CartProvider>
|
|
<div className="min-h-screen flex flex-col">
|
|
{/* Skip to main content link for keyboard users */}
|
|
<a
|
|
href="#main-content"
|
|
className="sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-50 focus:px-4 focus:py-2 focus:bg-background focus:border focus:border-primary focus:rounded-md focus:text-primary focus:font-medium"
|
|
>
|
|
Skip to main content
|
|
</a>
|
|
<Header />
|
|
<main id="main-content" className="flex-1">
|
|
{children}
|
|
</main>
|
|
<Footer />
|
|
</div>
|
|
<SiteChatWidget />
|
|
</CartProvider>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|