docs: update storefront development snippets for next.js 15 compatibility (#10843)
This commit is contained in:
@@ -25,13 +25,12 @@ export const highlights = [
|
||||
["14", "setCart", "Allow the context provider's children to update the cart."],
|
||||
["17", "refreshCart", "Allow the context provider's children to unset and reset the cart."],
|
||||
["26", "CartProvider", "The provider component to use in your component tree."],
|
||||
["32", "useRegion", "Use the `useRegion` hook defined in the Region Context guide."],
|
||||
["37", "setItem", "Set the cart's ID in `localStorage` in case it changed."],
|
||||
["45", "fetch", "If the customer doesn't have a cart, create a new one."],
|
||||
["49", "process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY", "Pass the Publishable API key to associate the correct sales channel(s)."],
|
||||
["63", "fetch", "Retrieve the customer's cart."],
|
||||
["76", "refreshCart", "This function unsets the cart, which triggers the `useEffect` callback to create a cart."],
|
||||
["92", "useCart", "The hook that child components of the provider use to access the cart."]
|
||||
["30", "useRegion", "Use the `useRegion` hook defined in the Region Context guide."],
|
||||
["40", "fetch", "If the customer doesn't have a cart, create a new one."],
|
||||
["44", "process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY", "Pass the Publishable API key to associate the correct sales channel(s)."],
|
||||
["58", "fetch", "Retrieve the customer's cart."],
|
||||
["71", "refreshCart", "This function unsets the cart, which triggers the `useEffect` callback to create a cart."],
|
||||
["87", "useCart", "The hook that child components of the provider use to access the cart."]
|
||||
]
|
||||
|
||||
```tsx highlights={highlights}
|
||||
|
||||
Reference in New Issue
Block a user