notrab / react-use-cart

React hook library for managing cart state
http://npm.im/react-use-cart
Apache License 2.0
367 stars 48 forks source link

emptyCart() navigate the user to cart page #123

Closed hazem-saeed closed 1 year ago

hazem-saeed commented 1 year ago

I'm using the package in my next.js project. When the user clicks the send button to complete their purchase, I added emptyCart() after the order is creation success. But emptyCart() navigates the user to the cart page!

I checked the function, but I found nothing of that behavior in the package.

Can you please check it out, and tell me how to override this?

Thanks

notrab commented 1 year ago

Hey @hazem-saeed

This has to be something specific to your code base. There's nothing in the package that does any routing.