cancel subscriptions on signup popup destroy

This commit is contained in:
2025-06-03 23:28:12 +02:00
parent 54352d7b73
commit e09a232f3c
3 changed files with 12 additions and 4 deletions

View File

@ -1,14 +1,17 @@
<script lang="ts">
import { teamPopupOpen, teamPopupName } from '@app/website/signup/TeamPopup.ts';
import Input from '@components/input/Input.svelte';
import { onDestroy } from 'svelte';
let modal: HTMLDialogElement;
let form: HTMLFormElement;
teamPopupOpen.subscribe((value) => {
const cancel = teamPopupOpen.subscribe((value) => {
if (value) modal.show();
else form?.reset();
});
onDestroy(cancel);
</script>
<dialog class="modal" bind:this={modal} onclose={() => ($teamPopupOpen = false)}>