diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-06-01 21:13:43 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-06-01 21:13:43 +0200 |
| commit | 9383a2fb09ffb60cfe63683106945bd688affa59 (patch) | |
| tree | 65b3f4b48841583e355887db5de5a16e7005fc87 /src/wwwroot/scripts/front/status.js | |
| download | vinjesvingenhandel.no-9383a2fb09ffb60cfe63683106945bd688affa59.tar.xz vinjesvingenhandel.no-9383a2fb09ffb60cfe63683106945bd688affa59.zip | |
feat: Initial commit after clean slate
Diffstat (limited to 'src/wwwroot/scripts/front/status.js')
| -rw-r--r-- | src/wwwroot/scripts/front/status.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wwwroot/scripts/front/status.js b/src/wwwroot/scripts/front/status.js new file mode 100644 index 0000000..3addfac --- /dev/null +++ b/src/wwwroot/scripts/front/status.js @@ -0,0 +1,10 @@ +import {cartDispose} from "../cart-core"; +import {pageInit} from "../base"; + +if (location.pathname.startsWith("/status")) { + pageInit(() => { + const urlParams = new URLSearchParams(window.location.search); + const clearCart = urlParams.get("clearCart"); + if (clearCart) cartDispose(); + }); +} |
