import { CartProvider } from "components/cart/cart-context"; import { Navbar } from "components/layout/navbar"; import { WelcomeToast } from "components/welcome-toast"; import { GeistSans } from "geist/font/sans"; import { getCart } from "lib/sfcc"; import { baseUrl } from "lib/utils"; import { ReactNode } from "react"; import { Toaster } from "sonner"; import "./globals.css"; const { SITE_NAME } = process.env; export const metadata = { metadataBase: new URL(baseUrl), title: { default: SITE_NAME!, template: `%s | ${SITE_NAME}`, }, robots: { follow: true, index: true, }, }; export default async function RootLayout({ children, }: { children: ReactNode; }) { // Don't await the fetch, pass the Promise to the context provider const cart = getCart(); return (