diff --git a/frontend/app/composables/useToast.ts b/frontend/app/composables/useToast.ts index 3b06474..7393d57 100644 --- a/frontend/app/composables/useToast.ts +++ b/frontend/app/composables/useToast.ts @@ -33,7 +33,7 @@ export function useToast() { message, type, visible: true, - duration: type === 'error' ? 0 : duration, + duration, } if (toasts.value.length >= MAX_TOASTS) { @@ -42,8 +42,7 @@ export function useToast() { toasts.value.push(toast) - // Only auto-dismiss non-error toasts - if (type !== 'error' && duration > 0) { + if (duration > 0) { setTimeout(() => { removeToast(id) }, duration) @@ -56,8 +55,8 @@ export function useToast() { return showToast(message, 'success', duration) } - const showError = (message: string): number => { - return showToast(message, 'error', 0) + const showError = (message: string, duration = 8000): number => { + return showToast(message, 'error', duration) } const showWarning = (message: string, duration = 6000): number => {