fix: restore fly transition on Toast, clean up debug logs
Add fly transition back to Toast component and move cleanup from onDestroy to onMount return for SSR safety. Remove debug console.logs from page orchestrator. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { onMount, onDestroy } from 'svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import { fly } from 'svelte/transition';
|
||||
|
||||
/** @type {string} */
|
||||
@@ -40,14 +40,11 @@
|
||||
|
||||
onMount(() => {
|
||||
startTimer();
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
clearTimer();
|
||||
return () => clearTimer();
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="toast" transition:fly={{ y: 20, duration: 200 }}>
|
||||
<div class="toast" transition:fly={{ y: 50, duration: 200 }}>
|
||||
<span class="toast-message">{message}</span>
|
||||
{#if action}
|
||||
<button class="toast-action" on:click={handleAction} type="button">
|
||||
|
||||
@@ -148,7 +148,6 @@
|
||||
|
||||
try {
|
||||
await tasksStore.complete(uuid);
|
||||
// Show undo toast
|
||||
undoToast = { uuid: task.uuid, description: task.description };
|
||||
} catch (error) {
|
||||
console.error('Failed to complete task:', error);
|
||||
|
||||
Reference in New Issue
Block a user