diff --git a/client/src/components/Toast.svelte b/client/src/components/Toast.svelte index 90cb384..c88867a 100644 --- a/client/src/components/Toast.svelte +++ b/client/src/components/Toast.svelte @@ -2,16 +2,6 @@ import { toast } from '../stores/toastStore.js'; import { fade } from 'svelte/transition'; - let toastData = { - message: null, - type: 'success', - visible: false - }; - - toast.subscribe(value => { - toastData = value; - }); - const icons = { success: 'fa-solid fa-circle-check', error: 'fa-solid fa-circle-exclamation', @@ -19,11 +9,11 @@ }; -{#if toastData.visible && toastData.message} +{#if $toast.visible && $toast.message}