diff --git a/.env.example b/.env.example deleted file mode 100644 index f7fa990d41..0000000000 --- a/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -COMPANY_NAME="Vercel Inc." -SITE_NAME="Next.js Commerce" -SHOPIFY_REVALIDATION_SECRET="" -SHOPIFY_STOREFRONT_ACCESS_TOKEN="" -SHOPIFY_STORE_DOMAIN="[your-shopify-store-subdomain].myshopify.com" diff --git a/app/layout.tsx b/app/layout.tsx index 4e4b4afa64..e457aa4df8 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -3,10 +3,10 @@ import { Navbar } from "components/layout/navbar"; import { WelcomeToast } from "components/welcome-toast"; import { GeistSans } from "geist/font/sans"; import { getCart } from "lib/shopify"; -import { ReactNode } from "react"; +import { baseUrl } from "lib/utils"; +import { ReactNode, Suspense } from "react"; // Added Suspense import { Toaster } from "sonner"; import "./globals.css"; -import { baseUrl } from "lib/utils"; const { SITE_NAME } = process.env; @@ -27,7 +27,6 @@ export default async function RootLayout({ }: { children: ReactNode; }) { - // Don't await the fetch, pass the Promise to the context provider const cart = getCart(); return ( @@ -35,13 +34,20 @@ export default async function RootLayout({