forked from Aaron/Kino-Website
refactor: redistribute main.ts logic into Astro components
This commit is contained in:
@@ -8,3 +8,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const overlay = document.getElementById("snack-prompt-overlay");
|
||||
const btnYes = document.getElementById("btn-yes-snacks");
|
||||
const btnNo = document.getElementById("btn-no-cart");
|
||||
|
||||
btnYes?.addEventListener("click", () => {
|
||||
overlay?.classList.add("hidden");
|
||||
window.location.href = "/snacks";
|
||||
});
|
||||
|
||||
btnNo?.addEventListener("click", () => {
|
||||
overlay?.classList.add("hidden");
|
||||
window.location.href = "/cart";
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user