dayhaysoos / use-shopping-cart

Shopping cart state and logic for Stripe
MIT License
907 stars 118 forks source link

Fix documentation example error for checkout session mode #318

Closed edgarlr closed 1 year ago

edgarlr commented 1 year ago

Currently, the checkout session mode example has a type error in the documentation, if you set cartMode="checkout-session" then mode="payment" does not exist in type

Screenshot 2023-03-25 at 19 12 02

That behavior is expected since the mode and other parameters are defined in the backend and the CheckoutSession mode doesn't actually include the mode

https://github.com/dayhaysoos/use-shopping-cart/blob/f3bd4736916c4bf97c0c7cd8af6a25d4a8ab87d8/use-shopping-cart/core/index.d.ts#L58-L63

So the is only remove that line from the example

netlify[bot] commented 1 year ago

Deploy request for useshoppingcart pending review.

Visit the deploys page to approve it

Name Link
Latest commit f06d3e879565030c7e1a31bd10bc7f4983cb1d16