* hide standard text when we have a description
* lookup description in message bundle Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
parent
eb5afeeabb
commit
b4caeee0c7
1 changed files with 6 additions and 5 deletions
|
@ -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) => {
|
|||
<Page>
|
||||
<Modal
|
||||
variant={ModalVariant.small}
|
||||
title={t("somethingWentWrong")}
|
||||
title={errorMessage ? "" : t("somethingWentWrong")}
|
||||
titleIconVariant="danger"
|
||||
showClose={false}
|
||||
isOpen
|
||||
|
@ -41,9 +41,10 @@ export const ErrorPage = (props: ErrorPageProps) => {
|
|||
]}
|
||||
>
|
||||
<TextContent>
|
||||
{errorMessage ? (
|
||||
<Text>{label(t, errorMessage)}</Text>
|
||||
) : (
|
||||
<Text>{t("somethingWentWrongDescription")}</Text>
|
||||
{errorMessage && (
|
||||
<Text component={TextVariants.small}>{errorMessage}</Text>
|
||||
)}
|
||||
</TextContent>
|
||||
</Modal>
|
||||
|
|
Loading…
Reference in a new issue