diff --git a/.env.template b/.env.template index bba85e7a9..d503cacc6 100644 --- a/.env.template +++ b/.env.template @@ -17,6 +17,7 @@ NEXT_PUBLIC_STRIPE_KEY= NEXT_PUBLIC_PAYPAL_CLIENT_ID= # Your MeiliSearch / Algolia keys. See – https://docs.medusajs.com/add-plugins/meilisearch or https://docs.medusajs.com/add-plugins/algolia +NEXT_PUBLIC_FEATURE_SEARCH_ENABLED=false NEXT_PUBLIC_SEARCH_APP_ID= NEXT_PUBLIC_SEARCH_ENDPOINT=http://127.0.0.1:7700 NEXT_PUBLIC_SEARCH_API_KEY= diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 3ee8acb20..000000000 --- a/netlify.toml +++ /dev/null @@ -1,2 +0,0 @@ -[template.environment] -NEXT_PUBLIC_MEDUSA_BACKEND_URL="URL of your Medusa Server" diff --git a/next.config.js b/next.config.js index 3955381a9..10e4b3cd0 100644 --- a/next.config.js +++ b/next.config.js @@ -1,11 +1,7 @@ -const { withStoreConfig } = require("./store-config") -const store = require("./store.config.json") - /** * @type {import('next').NextConfig} */ -const nextConfig = withStoreConfig({ - features: store.features, +const nextConfig = { reactStrictMode: true, images: { remotePatterns: [ @@ -27,7 +23,7 @@ const nextConfig = withStoreConfig({ }, ], }, -}) +} console.log("next.config.js", JSON.stringify(module.exports, null, 2)) diff --git a/src/app/[countryCode]/(checkout)/checkout/page.tsx b/src/app/[countryCode]/(checkout)/checkout/page.tsx index 53b873608..a4704f129 100644 --- a/src/app/[countryCode]/(checkout)/checkout/page.tsx +++ b/src/app/[countryCode]/(checkout)/checkout/page.tsx @@ -6,6 +6,7 @@ import CheckoutForm from "@modules/checkout/templates/checkout-form" import CheckoutSummary from "@modules/checkout/templates/checkout-summary" import { enrichLineItems, retrieveCart } from "@lib/data/cart" import { HttpTypes } from "@medusajs/types" +import { getCustomer } from "@lib/data/customer" export const metadata: Metadata = { title: "Checkout", @@ -18,10 +19,7 @@ const fetchCart = async () => { } if (cart?.items?.length) { - const enrichedItems = await enrichLineItems( - cart?.items, - cart?.currency_code - ) + const enrichedItems = await enrichLineItems(cart?.items, cart?.region_id!) cart.items = enrichedItems as HttpTypes.StoreCartLineItem[] } @@ -30,15 +28,12 @@ const fetchCart = async () => { export default async function Checkout() { const cart = await fetchCart() - - if (!cart) { - return notFound() - } + const customer = await getCustomer() return (