feat: refactor folder refresh with toast notifications and console logging for toasts.

This commit is contained in:
2025-12-08 19:20:36 +01:00
parent dbff980792
commit a850f70e24
3 changed files with 22 additions and 5 deletions
@@ -43,6 +43,15 @@ export const StatusToastProvider: React.FC<{ children: React.ReactNode }> = ({ c
}, []);
const showToast = useCallback((message: string, variant: ToastVariant = 'info', duration?: number) => {
// Log to console based on variant
if (variant === 'error') {
console.error(`[Toast] ${message}`);
} else if (variant === 'success') {
console.log(`[Toast] ${message}`);
} else {
console.info(`[Toast] ${message}`);
}
const id = `toast-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
const finalDuration = duration ?? DEFAULT_DURATIONS[variant];