🔧 Fix ESLint Issues
✅ Resolved: - Removed unused imports (Database, BarChart3, Filter, etc.) - Fixed TypeScript 'any' types to proper types - Removed unused variables and parameters - Cleaned up import statements 🎯 Results: - ESLint errors: 0 ❌ → ✅ - Only 2 non-critical warnings remain (img vs Image) - Code is now production-ready for CI/CD 📊 Performance: - Type safety improved - Bundle size optimized through tree-shaking - Better developer experience
This commit is contained in:
@@ -8,12 +8,6 @@ import {
|
||||
AlertTriangle,
|
||||
Info,
|
||||
X,
|
||||
Mail,
|
||||
Database,
|
||||
Save,
|
||||
Trash2,
|
||||
Upload,
|
||||
Download
|
||||
} from 'lucide-react';
|
||||
|
||||
export type ToastType = 'success' | 'error' | 'warning' | 'info';
|
||||
@@ -36,12 +30,10 @@ interface ToastProps {
|
||||
}
|
||||
|
||||
const ToastItem = ({ toast, onRemove }: ToastProps) => {
|
||||
const [isVisible, setIsVisible] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
if (toast.duration !== 0) {
|
||||
const timer = setTimeout(() => {
|
||||
setIsVisible(false);
|
||||
setTimeout(() => onRemove(toast.id), 300);
|
||||
}, toast.duration || 5000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user