From 0cd4f041b7e9218fb0c5ac69d75a67735a977a84 Mon Sep 17 00:00:00 2001 From: "shahar.shmaram" Date: Thu, 21 Apr 2022 12:57:36 +0300 Subject: [PATCH] added support for a custom component when entity not found Signed-off-by: shahar.shmaram --- .../components/EntityLayout/EntityLayout.tsx | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx b/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx index f76690c010..693137fe21 100644 --- a/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx +++ b/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx @@ -260,6 +260,12 @@ export const EntityLayout = (props: EntityLayoutProps) => { {entity && } {error && ( + + {error.toString()} + + )} + + {!loading && !error && !entity && ( {NotFoundComponent ? ( NotFoundComponent @@ -275,18 +281,6 @@ export const EntityLayout = (props: EntityLayoutProps) => { )} - {!loading && !error && !entity && ( - - - There is no {kind} with the requested{' '} - - kind, namespace, and name - - . - - - )} -