This commit is contained in:
Timothy J. Baek 2024-08-21 15:42:33 +02:00
parent b45db22a17
commit da1d5ad917
1 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { onMount } from 'svelte';
import { onDestroy, onMount } from 'svelte';
import { fade } from 'svelte/transition';
import { flyAndScale } from '$lib/utils/transitions';
@ -47,6 +47,13 @@
document.body.removeChild(modalElement);
document.body.style.overflow = 'unset';
}
onDestroy(() => {
show = false;
if (modalElement) {
document.body.removeChild(modalElement);
}
});
</script>
{#if show}