diff --git a/src/components/Common/ErrorNotification/index.tsx b/src/components/Common/ErrorNotification/index.tsx index 73a6154c..5580666f 100644 --- a/src/components/Common/ErrorNotification/index.tsx +++ b/src/components/Common/ErrorNotification/index.tsx @@ -35,45 +35,53 @@ const ErrorNotification = ({ if (errors.length === 0 || suppressErrors) return null; + // Only show the latest error to avoid overwhelming the user + const visibleError = errors[errors.length - 1]; + const remainingCount = Math.max(0, errors.length - 1); + return (
- {errors.map((error) => ( -
-
- {error.type === "error" && ( - - )} - {error.type === "warning" && ( - - )} - {error.type === "info" && ( - - )} +
+
+ {visibleError.type === "error" && ( + + )} + {visibleError.type === "warning" && ( + + )} + {visibleError.type === "info" && ( + + )} - - {error.message} + + {visibleError.message} + + + {remainingCount > 0 && ( + + +{remainingCount} -
- - removeError(error.id)} - /> + )}
- ))} + + removeError(visibleError.id)} + /> +
); };