diff --git a/www/apps/resources/app/storefront-development/cart/context/page.mdx b/www/apps/resources/app/storefront-development/cart/context/page.mdx index 9b57ce38c7..c4777794a4 100644 --- a/www/apps/resources/app/storefront-development/cart/context/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/context/page.mdx @@ -72,7 +72,7 @@ export const CartProvider = ({ children }: CartProviderProps) => { method: "POST", credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", "Content-Type": "application/json", }, body: JSON.stringify({ @@ -89,7 +89,7 @@ export const CartProvider = ({ children }: CartProviderProps) => { fetch(`http://localhost:9000/store/carts/${cartId}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/cart/create/page.mdx b/www/apps/resources/app/storefront-development/cart/create/page.mdx index 84bcd6c969..c4fd44aa4d 100644 --- a/www/apps/resources/app/storefront-development/cart/create/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/create/page.mdx @@ -30,7 +30,7 @@ export const fetchHighlights = [ method: "POST", credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", "Content-Type": "application/json", }, body: JSON.stringify({ @@ -81,7 +81,7 @@ export const highlights = [ method: "POST", credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", "Content-Type": "application/json", }, body: JSON.stringify({ diff --git a/www/apps/resources/app/storefront-development/cart/manage-items/page.mdx b/www/apps/resources/app/storefront-development/cart/manage-items/page.mdx index 7f0b476eac..388b0d3085 100644 --- a/www/apps/resources/app/storefront-development/cart/manage-items/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/manage-items/page.mdx @@ -36,7 +36,7 @@ const addToCart = (variant_id: string) => { method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ variant_id, @@ -93,7 +93,7 @@ const updateQuantity = ( method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ quantity, @@ -143,7 +143,7 @@ const removeItem = (itemId: string) => { }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, method: "DELETE", }) diff --git a/www/apps/resources/app/storefront-development/cart/retrieve/page.mdx b/www/apps/resources/app/storefront-development/cart/retrieve/page.mdx index 871a8819c1..487c172e0c 100644 --- a/www/apps/resources/app/storefront-development/cart/retrieve/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/retrieve/page.mdx @@ -23,7 +23,7 @@ export const fetchHighlights = [ fetch(`http://localhost:9000/store/carts/${cartId}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -69,7 +69,7 @@ export const highlights = [ fetch(`http://localhost:9000/store/carts/${cartId}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/cart/update/page.mdx b/www/apps/resources/app/storefront-development/cart/update/page.mdx index 99d52e9a47..a7e1de66d6 100644 --- a/www/apps/resources/app/storefront-development/cart/update/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/update/page.mdx @@ -31,7 +31,7 @@ fetch(`http://localhost:9000/store/carts/${cartId}`, { headers: { "Content-Type": "application/json", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }, body: JSON.stringify({ diff --git a/www/apps/resources/app/storefront-development/checkout/address/page.mdx b/www/apps/resources/app/storefront-development/checkout/address/page.mdx index f89eec51c9..63b2fe4df4 100644 --- a/www/apps/resources/app/storefront-development/checkout/address/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/address/page.mdx @@ -37,7 +37,7 @@ For example: method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ shipping_address: address, @@ -108,7 +108,7 @@ export const highlights = [ method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ shipping_address: address, diff --git a/www/apps/resources/app/storefront-development/checkout/complete-cart/page.mdx b/www/apps/resources/app/storefront-development/checkout/complete-cart/page.mdx index f719598713..372160de4c 100644 --- a/www/apps/resources/app/storefront-development/checkout/complete-cart/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/complete-cart/page.mdx @@ -18,7 +18,7 @@ fetch( { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, method: "POST", } @@ -91,7 +91,7 @@ export default function SystemDefaultPayment() { { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, method: "POST", } diff --git a/www/apps/resources/app/storefront-development/checkout/email/page.mdx b/www/apps/resources/app/storefront-development/checkout/email/page.mdx index 07df4bc8ad..2a37145e43 100644 --- a/www/apps/resources/app/storefront-development/checkout/email/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/email/page.mdx @@ -27,7 +27,7 @@ For example: method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ email, @@ -82,7 +82,7 @@ export const highlights = [ method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ email, diff --git a/www/apps/resources/app/storefront-development/checkout/payment/page.mdx b/www/apps/resources/app/storefront-development/checkout/payment/page.mdx index da5bbdc834..6aeadfae8f 100644 --- a/www/apps/resources/app/storefront-development/checkout/payment/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/payment/page.mdx @@ -60,7 +60,7 @@ const retrievePaymentProviders = async () => { }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -82,7 +82,7 @@ const selectPaymentProvider = async ( method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ cart_id: cart.id, @@ -103,7 +103,7 @@ const selectPaymentProvider = async ( method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ provider_id: selectedPaymentProviderId, @@ -119,7 +119,7 @@ const selectPaymentProvider = async ( { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, } ) @@ -209,7 +209,7 @@ export default function CheckoutPaymentStep() { }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -242,7 +242,7 @@ export default function CheckoutPaymentStep() { method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ cart_id: cart.id, @@ -263,7 +263,7 @@ export default function CheckoutPaymentStep() { method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ provider_id: selectedPaymentProvider, @@ -279,7 +279,7 @@ export default function CheckoutPaymentStep() { { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, } ) diff --git a/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx b/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx index 8085fd1616..f2c3478a16 100644 --- a/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx @@ -172,7 +172,7 @@ const StripeForm = ({ { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, method: "POST", } diff --git a/www/apps/resources/app/storefront-development/checkout/shipping/page.mdx b/www/apps/resources/app/storefront-development/checkout/shipping/page.mdx index 13bcf171c3..b80b8d6a42 100644 --- a/www/apps/resources/app/storefront-development/checkout/shipping/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/shipping/page.mdx @@ -34,7 +34,7 @@ export const fetchHighlights = [ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, } ) @@ -53,7 +53,7 @@ export const fetchHighlights = [ method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ option_id: selectedShippingOptionId, @@ -108,7 +108,7 @@ export const highlights = [ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -134,7 +134,7 @@ export const highlights = [ method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ option_id: selectedShippingOption, diff --git a/www/apps/resources/app/storefront-development/customers/addresses/page.mdx b/www/apps/resources/app/storefront-development/customers/addresses/page.mdx index 1f3fccc247..c2a75edab8 100644 --- a/www/apps/resources/app/storefront-development/customers/addresses/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/addresses/page.mdx @@ -31,7 +31,7 @@ export const fetchHighlights = [ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -86,7 +86,7 @@ export const highlights = [ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -161,7 +161,7 @@ To add a new address for the customer, send a request to the [Add Customer Addre method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ first_name: firstName, @@ -226,7 +226,7 @@ export const addHighlights = [ method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ first_name: firstName, @@ -345,7 +345,7 @@ To edit an address, send a request to the [Update Customer Address API route](!a method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ first_name: firstName, @@ -449,7 +449,7 @@ export const editHighlights = [ method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ first_name: firstName, @@ -568,7 +568,7 @@ fetch( { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, method: "DELETE", } diff --git a/www/apps/resources/app/storefront-development/customers/context/page.mdx b/www/apps/resources/app/storefront-development/customers/context/page.mdx index 66879fbd14..8d1753e83d 100644 --- a/www/apps/resources/app/storefront-development/customers/context/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/context/page.mdx @@ -60,7 +60,7 @@ export const CustomerProvider = ({ fetch(`http://localhost:9000/store/customers/me`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/customers/login/page.mdx b/www/apps/resources/app/storefront-development/customers/login/page.mdx index 188a8ad001..b57ea2a3a5 100644 --- a/www/apps/resources/app/storefront-development/customers/login/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/login/page.mdx @@ -51,7 +51,7 @@ export const fetchHighlights = [ headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, } ) @@ -116,7 +116,7 @@ export const highlights = [ headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, } ) @@ -223,7 +223,7 @@ export const fetchSessionHighlights = [ credentials: "include", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, } ) @@ -303,7 +303,7 @@ export const sessionHighlights = [ credentials: "include", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, } ) diff --git a/www/apps/resources/app/storefront-development/customers/profile/page.mdx b/www/apps/resources/app/storefront-development/customers/profile/page.mdx index 7a6d614420..9a5194c935 100644 --- a/www/apps/resources/app/storefront-development/customers/profile/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/profile/page.mdx @@ -19,7 +19,7 @@ For example: method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ first_name, @@ -82,7 +82,7 @@ export const highlights = [ method: "POST", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ first_name: firstName, diff --git a/www/apps/resources/app/storefront-development/customers/register/page.mdx b/www/apps/resources/app/storefront-development/customers/register/page.mdx index 4716dc2d63..0cdf2b6cd8 100644 --- a/www/apps/resources/app/storefront-development/customers/register/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/register/page.mdx @@ -52,7 +52,7 @@ export const fetchHighlights = [ headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ first_name: firstName, @@ -125,7 +125,7 @@ export const highlights = [ headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ first_name: firstName, diff --git a/www/apps/resources/app/storefront-development/customers/retrieve/page.mdx b/www/apps/resources/app/storefront-development/customers/retrieve/page.mdx index 47719396f8..96c5ae3767 100644 --- a/www/apps/resources/app/storefront-development/customers/retrieve/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/retrieve/page.mdx @@ -23,7 +23,7 @@ export const bearerHighlights = [ headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, } ) @@ -48,7 +48,7 @@ export const sessionHighlights = [ credentials: "include", headers: { "Content-Type": "application/json", - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, } ) diff --git a/www/apps/resources/app/storefront-development/customers/third-party-login/page.mdx b/www/apps/resources/app/storefront-development/customers/third-party-login/page.mdx index 831a436d33..d6d83ccc82 100644 --- a/www/apps/resources/app/storefront-development/customers/third-party-login/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/third-party-login/page.mdx @@ -85,7 +85,7 @@ const loginWithGoogle = async () => { headers: { "Content-Type": "application/json", "Authorization": `Bearer ${result.token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, } ) @@ -139,7 +139,7 @@ export default function Login() { headers: { "Content-Type": "application/json", "Authorization": `Bearer ${result.token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, } ) @@ -294,7 +294,7 @@ const createCustomer = async (token: string) => { headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ // TODO show form to retrieve email from customer @@ -367,7 +367,7 @@ const validateCallback = async () => { headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ // TODO show form to retrieve email from customer @@ -410,7 +410,7 @@ const validateCallback = async () => { headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ // TODO show form to retrieve email from customer @@ -486,7 +486,7 @@ const createCustomer = async (token: string) => { headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ // TODO show form to retrieve email from customer @@ -527,7 +527,7 @@ const validateCallback = async () => { headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ // TODO show form to retrieve email from customer @@ -582,7 +582,7 @@ export default function GoogleCallback() { headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ // TODO show form to retrieve email from customer @@ -623,7 +623,7 @@ export default function GoogleCallback() { headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, body: JSON.stringify({ // TODO show form to retrieve email from customer diff --git a/www/apps/resources/app/storefront-development/products/categories/list/page.mdx b/www/apps/resources/app/storefront-development/products/categories/list/page.mdx index 2d7312f91b..c732697634 100644 --- a/www/apps/resources/app/storefront-development/products/categories/list/page.mdx +++ b/www/apps/resources/app/storefront-development/products/categories/list/page.mdx @@ -19,7 +19,7 @@ To retrieve the list of product categories, send a request to the [List Product fetch(`http://localhost:9000/store/product-categories`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -58,7 +58,7 @@ export const highlights = [ fetch(`http://localhost:9000/store/product-categories`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -144,7 +144,7 @@ export default function Categories() { }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -214,7 +214,7 @@ fetch(`http://localhost:9000/store/product-categories?${ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/categories/nested-categories/page.mdx b/www/apps/resources/app/storefront-development/products/categories/nested-categories/page.mdx index 63740305a4..14df668f7e 100644 --- a/www/apps/resources/app/storefront-development/products/categories/nested-categories/page.mdx +++ b/www/apps/resources/app/storefront-development/products/categories/nested-categories/page.mdx @@ -29,7 +29,7 @@ export const fetchHighlights = [ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -82,7 +82,7 @@ export const highlights = [ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/categories/products/page.mdx b/www/apps/resources/app/storefront-development/products/categories/products/page.mdx index e73cd6160f..0ceeb89e7f 100644 --- a/www/apps/resources/app/storefront-development/products/categories/products/page.mdx +++ b/www/apps/resources/app/storefront-development/products/categories/products/page.mdx @@ -25,7 +25,7 @@ export const fetchHighlights = [ fetch(`http://localhost:9000/store/products?${searchParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -86,7 +86,7 @@ export const highlights = [ fetch(`http://localhost:9000/store/products?${searchParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/categories/retrieve/page.mdx b/www/apps/resources/app/storefront-development/products/categories/retrieve/page.mdx index eef5e797f1..7a8efa519b 100644 --- a/www/apps/resources/app/storefront-development/products/categories/retrieve/page.mdx +++ b/www/apps/resources/app/storefront-development/products/categories/retrieve/page.mdx @@ -28,7 +28,7 @@ export const fetchHighlights = [ fetch(`http://localhost:9000/store/product-categories/${id}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -73,7 +73,7 @@ export const highlights = [ fetch(`http://localhost:9000/store/product-categories/${id}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -121,7 +121,7 @@ export const handleFetchHighlights = [ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -173,7 +173,7 @@ export const handleHighlights = [ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/collections/list/page.mdx b/www/apps/resources/app/storefront-development/products/collections/list/page.mdx index adace6b01c..f70812478a 100644 --- a/www/apps/resources/app/storefront-development/products/collections/list/page.mdx +++ b/www/apps/resources/app/storefront-development/products/collections/list/page.mdx @@ -19,7 +19,7 @@ To retrieve the list of product collections, send a request to the [List Product fetch(`http://localhost:9000/store/collections`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -58,7 +58,7 @@ export const highlights = [ fetch(`http://localhost:9000/store/collections`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -146,7 +146,7 @@ export default function Collections() { }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -216,7 +216,7 @@ fetch(`http://localhost:9000/store/collections?${ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/collections/products/page.mdx b/www/apps/resources/app/storefront-development/products/collections/products/page.mdx index aa44a73fcb..192fbc44fa 100644 --- a/www/apps/resources/app/storefront-development/products/collections/products/page.mdx +++ b/www/apps/resources/app/storefront-development/products/collections/products/page.mdx @@ -25,7 +25,7 @@ export const fetchHighlights = [ fetch(`http://localhost:9000/store/products?${searchParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -88,7 +88,7 @@ export const highlights = [ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/collections/retrieve/page.mdx b/www/apps/resources/app/storefront-development/products/collections/retrieve/page.mdx index a99eea35be..1def0f6bfb 100644 --- a/www/apps/resources/app/storefront-development/products/collections/retrieve/page.mdx +++ b/www/apps/resources/app/storefront-development/products/collections/retrieve/page.mdx @@ -28,7 +28,7 @@ export const fetchHighlights = [ fetch(`http://localhost:9000/store/collections/${id}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -74,7 +74,7 @@ export const highlights = [ fetch(`http://localhost:9000/store/collections/${id}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -123,7 +123,7 @@ export const handleFetchHighlights = [ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -177,7 +177,7 @@ export const handleHighlights = [ }`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/inventory/page.mdx b/www/apps/resources/app/storefront-development/products/inventory/page.mdx index 6fcc3eab68..53aa9508b9 100644 --- a/www/apps/resources/app/storefront-development/products/inventory/page.mdx +++ b/www/apps/resources/app/storefront-development/products/inventory/page.mdx @@ -27,7 +27,7 @@ const queryParams = new URLSearchParams({ fetch(`http://localhost:9000/store/products/${id}?${queryParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -97,7 +97,7 @@ export default function Product({ params: { id } }: Params) { fetch(`http://localhost:9000/store/products/${id}?${queryParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/list/page.mdx b/www/apps/resources/app/storefront-development/products/list/page.mdx index 9547552a77..34efffb7a7 100644 --- a/www/apps/resources/app/storefront-development/products/list/page.mdx +++ b/www/apps/resources/app/storefront-development/products/list/page.mdx @@ -23,7 +23,7 @@ export const fetchHighlights = [ fetch(`http://localhost:9000/store/products`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -62,7 +62,7 @@ export const highlights = [ fetch(`http://localhost:9000/store/products`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -146,7 +146,7 @@ export default function Products() { fetch(`http://localhost:9000/store/products?${searchParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -212,7 +212,7 @@ const searchParams = new URLSearchParams({ fetch(`http://localhost:9000/store/products?${searchParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/price/examples/sale-price/page.mdx b/www/apps/resources/app/storefront-development/products/price/examples/sale-price/page.mdx index 6a79fbc966..5f4c0f99a6 100644 --- a/www/apps/resources/app/storefront-development/products/price/examples/sale-price/page.mdx +++ b/www/apps/resources/app/storefront-development/products/price/examples/sale-price/page.mdx @@ -99,7 +99,7 @@ export default function Product({ params: { id } }: Params) { fetch(`http://localhost:9000/store/products/${id}?${queryParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/price/examples/show-price/page.mdx b/www/apps/resources/app/storefront-development/products/price/examples/show-price/page.mdx index c540d6c8e7..36de4f39ab 100644 --- a/www/apps/resources/app/storefront-development/products/price/examples/show-price/page.mdx +++ b/www/apps/resources/app/storefront-development/products/price/examples/show-price/page.mdx @@ -100,7 +100,7 @@ export default function Product({ params: { id } }: Params) { fetch(`http://localhost:9000/store/products/${id}?${queryParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/price/examples/tax-price/page.mdx b/www/apps/resources/app/storefront-development/products/price/examples/tax-price/page.mdx index 24d2aa7db0..affdc2c856 100644 --- a/www/apps/resources/app/storefront-development/products/price/examples/tax-price/page.mdx +++ b/www/apps/resources/app/storefront-development/products/price/examples/tax-price/page.mdx @@ -31,7 +31,7 @@ const queryParams = new URLSearchParams({ fetch(`http://localhost:9000/store/products/${id}?${queryParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -141,7 +141,7 @@ export default function Product({ params: { id } }: Params) { fetch(`http://localhost:9000/store/products/${id}?${queryParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/price/page.mdx b/www/apps/resources/app/storefront-development/products/price/page.mdx index ad67d3f64f..01d842931f 100644 --- a/www/apps/resources/app/storefront-development/products/price/page.mdx +++ b/www/apps/resources/app/storefront-development/products/price/page.mdx @@ -30,7 +30,7 @@ const queryParams = new URLSearchParams({ fetch(`http://localhost:9000/store/products/${id}?${queryParams.toString()}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/retrieve/page.mdx b/www/apps/resources/app/storefront-development/products/retrieve/page.mdx index 333a40590f..9adb6668dc 100644 --- a/www/apps/resources/app/storefront-development/products/retrieve/page.mdx +++ b/www/apps/resources/app/storefront-development/products/retrieve/page.mdx @@ -29,7 +29,7 @@ export const fetchHighlights = [ fetch(`http://localhost:9000/store/products/${id}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -75,7 +75,7 @@ export const highlights = [ fetch(`http://localhost:9000/store/products/${id}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -140,7 +140,7 @@ export const handleFetchHighlights = [ fetch(`http://localhost:9000/store/products?handle=${handle}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -190,7 +190,7 @@ export const handleHighlights = [ fetch(`http://localhost:9000/store/products?handle=${handle}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/products/variants/page.mdx b/www/apps/resources/app/storefront-development/products/variants/page.mdx index d808d3a7ac..f9dfbad838 100644 --- a/www/apps/resources/app/storefront-development/products/variants/page.mdx +++ b/www/apps/resources/app/storefront-development/products/variants/page.mdx @@ -55,7 +55,7 @@ export default function Product({ params: { id } }: Params) { fetch(`http://localhost:9000/store/products/${id}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/publishable-api-keys/page.mdx b/www/apps/resources/app/storefront-development/publishable-api-keys/page.mdx index e04ad8a80b..bb3a07d61e 100644 --- a/www/apps/resources/app/storefront-development/publishable-api-keys/page.mdx +++ b/www/apps/resources/app/storefront-development/publishable-api-keys/page.mdx @@ -67,7 +67,7 @@ export const highlights = [ fetch(`http://localhost:9000/store/products`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/regions/context/page.mdx b/www/apps/resources/app/storefront-development/regions/context/page.mdx index 976c3293d6..a006d9fef4 100644 --- a/www/apps/resources/app/storefront-development/regions/context/page.mdx +++ b/www/apps/resources/app/storefront-development/regions/context/page.mdx @@ -70,7 +70,7 @@ export const RegionProvider = ( fetch(`http://localhost:9000/store/regions`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -82,7 +82,7 @@ export const RegionProvider = ( fetch(`http://localhost:9000/store/regions/${regionId}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/regions/list/page.mdx b/www/apps/resources/app/storefront-development/regions/list/page.mdx index fb21e0c3e0..32fa523e9e 100644 --- a/www/apps/resources/app/storefront-development/regions/list/page.mdx +++ b/www/apps/resources/app/storefront-development/regions/list/page.mdx @@ -15,7 +15,7 @@ To list regions in your storefront, send a request to the [List Regions API rout fetch(`http://localhost:9000/store/regions`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) @@ -53,7 +53,7 @@ export const highlights = [ fetch(`http://localhost:9000/store/regions`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json()) diff --git a/www/apps/resources/app/storefront-development/regions/store-retrieve-region/page.mdx b/www/apps/resources/app/storefront-development/regions/store-retrieve-region/page.mdx index bc1fb4eb2f..ff9e17043f 100644 --- a/www/apps/resources/app/storefront-development/regions/store-retrieve-region/page.mdx +++ b/www/apps/resources/app/storefront-development/regions/store-retrieve-region/page.mdx @@ -34,7 +34,7 @@ const regionId = localStorage.getItem("region_id") fetch(`http://localhost:9000/store/regions/${regionId}`, { credentials: "include", headers: { - "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + "x-publishable-api-key": process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY || "temp", }, }) .then((res) => res.json())