diff options
Diffstat (limited to 'src/lib/checkout/components')
| -rw-r--r-- | src/lib/checkout/components/Checkout.jsx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index 511fcdba..c78757a0 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -168,6 +168,16 @@ const Checkout = () => { setExpedisi(dataExpedisi) } loadExpedisi() + + const handlePopState = () => { + router.push('/shop/cart') + } + + window.onpopstate = handlePopState + + return () => { + window.onpopstate = null + } // voucher() }, []) |
