From b4caeee0c7330bc6802e8e7820e8b6df24bbb654 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 10 Oct 2024 15:17:14 +0200 Subject: [PATCH] * hide standard text when we have a description * lookup description in message bundle Signed-off-by: Erik Jan de Wit --- js/libs/ui-shared/src/context/ErrorPage.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/js/libs/ui-shared/src/context/ErrorPage.tsx b/js/libs/ui-shared/src/context/ErrorPage.tsx index af0babd843..402aa4afcd 100644 --- a/js/libs/ui-shared/src/context/ErrorPage.tsx +++ b/js/libs/ui-shared/src/context/ErrorPage.tsx @@ -5,9 +5,9 @@ import { Page, Text, TextContent, - TextVariants, } from "@patternfly/react-core"; import { useTranslation } from "react-i18next"; +import { label } from "../user-profile/utils"; import { getNetworkErrorDescription } from "../utils/errors"; type ErrorPageProps = { @@ -30,7 +30,7 @@ export const ErrorPage = (props: ErrorPageProps) => { { ]} > - {t("somethingWentWrongDescription")} - {errorMessage && ( - {errorMessage} + {errorMessage ? ( + {label(t, errorMessage)} + ) : ( + {t("somethingWentWrongDescription")} )}