diff --git a/package.json b/package.json index 61d31ecfc..aa8cbe774 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "dependencies": { "@headlessui/react": "^1.6.1", "@hookform/error-message": "^2.0.0", - "@medusajs/js-sdk": "2.0.0", - "@medusajs/ui": "2.0.0", + "@medusajs/js-sdk": "latest", + "@medusajs/ui": "latest", "@meilisearch/instant-meilisearch": "^0.7.1", "@paypal/paypal-js": "^5.0.6", "@paypal/react-paypal-js": "^7.8.1", @@ -42,8 +42,8 @@ }, "devDependencies": { "@babel/core": "^7.17.5", - "@medusajs/types": "2.0.0", - "@medusajs/ui-preset": "2.0.0", + "@medusajs/types": "latest", + "@medusajs/ui-preset": "latest", "@playwright/test": "^1.41.1", "@types/lodash": "^4.14.195", "@types/node": "17.0.21", diff --git a/src/app/[countryCode]/(main)/layout.tsx b/src/app/[countryCode]/(main)/layout.tsx index ec979d494..dfc94702d 100644 --- a/src/app/[countryCode]/(main)/layout.tsx +++ b/src/app/[countryCode]/(main)/layout.tsx @@ -1,17 +1,26 @@ import { Metadata } from "next" +import { retrieveCart } from "@lib/data/cart" +import { getCustomer } from "@lib/data/customer" +import { getBaseURL } from "@lib/util/env" +import CartMismatchBanner from "@modules/layout/components/cart-mismatch-banner" import Footer from "@modules/layout/templates/footer" import Nav from "@modules/layout/templates/nav" -import { getBaseURL } from "@lib/util/env" export const metadata: Metadata = { metadataBase: new URL(getBaseURL()), } export default async function PageLayout(props: { children: React.ReactNode }) { + const customer = await getCustomer() + const cart = await retrieveCart() + return ( <>