diff --git a/src/components/BulkEditPane/BulkEditListResult/Preview/ErrorsAccordion/ErrorsAccordion.js b/src/components/BulkEditPane/BulkEditListResult/Preview/ErrorsAccordion/ErrorsAccordion.js
index 5f310dd1..9940b2c0 100644
--- a/src/components/BulkEditPane/BulkEditListResult/Preview/ErrorsAccordion/ErrorsAccordion.js
+++ b/src/components/BulkEditPane/BulkEditListResult/Preview/ErrorsAccordion/ErrorsAccordion.js
@@ -23,6 +23,26 @@ const columnMapping = {
message: ,
};
+const renderErrorMessage = (error, isLinkAvailable) => {
+ const link = getParam(error, ERROR_PARAMETERS_KEYS.LINK);
+
+ return (
+
+ {error.message}
+ {' '}
+ {!!link && isLinkAvailable && (
+
+
+
+
+
+
+
+ )}
+
+ );
+};
+
const ErrorsAccordion = ({
errors = [],
entries,
@@ -39,25 +59,7 @@ const ErrorsAccordion = ({
const resultsFormatter = {
key: error => getParam(error, ERROR_PARAMETERS_KEYS.IDENTIFIER),
- message: error => {
- const link = getParam(error, ERROR_PARAMETERS_KEYS.LINK);
-
- return (
-
- {error.message}
- {' '}
- {!!link && isLinkAvailable && (
-
-
-
-
-
-
-
- )}
-
- );
- },
+ message: error => renderErrorMessage(error, isLinkAvailable),
};
const location = useLocation();