refactoring majeur (code dupliqué, mort, ...)
- Économie : ~1240 lignes de code dupliqué - Réduction : ~60% du code modal - Amélioration : Cohérence et maintenabilité
This commit is contained in:
14
src/components/base/ErrorDisplay.tsx
Normal file
14
src/components/base/ErrorDisplay.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
interface ErrorDisplayProps {
|
||||
error: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function ErrorDisplay({ error, className = "" }: ErrorDisplayProps) {
|
||||
if (!error) return null;
|
||||
|
||||
return (
|
||||
<div className={`p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg ${className}`}>
|
||||
<p className="text-sm text-red-600 dark:text-red-400">{error}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user