From 92cdb4ee615bf6bf34e69a3c103c3ba79793ea22 Mon Sep 17 00:00:00 2001 From: wisecolt Date: Tue, 3 Feb 2026 12:39:47 +0300 Subject: [PATCH] =?UTF-8?q?refactor(ui):=20toast=20bile=C5=9Feninde=20reac?= =?UTF-8?q?tive=20store=20kullan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Toast.svelte | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) 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}
-
- - {toastData.message} +
+ + {$toast.message}
{/if}