diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-10-17 15:26:51 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-10-17 15:26:51 +0700 |
| commit | f20d4bdf0cf4acc65ae634eb3a58ecd976275c77 (patch) | |
| tree | 7f174fa27a7bc3a576d29753b908f85913f017f8 /src/lib/checkout/components/Checkout.jsx | |
| parent | f03be42400890aaa4b5a8480b9f1da9c2004a6fc (diff) | |
handle arrow back browser di page checkout
Diffstat (limited to 'src/lib/checkout/components/Checkout.jsx')
| -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() }, []) |
