diff --git a/src/lib/components/gadgets/timer/beeper.svelte b/src/lib/components/gadgets/timer/beeper.svelte index c5e2a09e..8172eb08 100644 --- a/src/lib/components/gadgets/timer/beeper.svelte +++ b/src/lib/components/gadgets/timer/beeper.svelte @@ -8,7 +8,7 @@ */ /** @type {Props} */ - let { beeping = $bindable(), beepingInterval = $bindable() } = $props(); + let { beeping, beepingInterval = $bindable() } = $props(); /** * Get the frequency of a note. diff --git a/src/lib/components/gadgets/timer/main.svelte b/src/lib/components/gadgets/timer/main.svelte index e390eb77..a502bd9f 100644 --- a/src/lib/components/gadgets/timer/main.svelte +++ b/src/lib/components/gadgets/timer/main.svelte @@ -16,6 +16,12 @@ let beeping = $state(false); /** @type {number|undefined} */ let beepingInterval = $state(undefined); + $effect(() => { + // Dummy IF to trigger the effect. + if (query) { + } + clearInterval(beepingInterval); + }); /** @type {HTMLElement | null} */ let timerNumbersContainer = $state(null); @@ -156,7 +162,7 @@ }} /> - +