import React, { useEffect } from 'react'; import { useUIStore } from '../store/ui'; export function ErrorToast() { const { errors, removeError } = useUIStore(); useEffect(() => { if (errors.length > 0) { const timer = setTimeout(() => removeError(0), 5000); return () => clearTimeout(timer); } }, [errors, removeError]); if (errors.length === 0) return null; return (