From 21a5a6028eed879d0144f00d3b17ba3cb4364117 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Fri, 17 Nov 2023 14:15:31 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Fixed=20the=20error=20check=20on?= =?UTF-8?q?=20Library=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/components/Library/Library.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/client/components/Library/Library.tsx b/src/client/components/Library/Library.tsx index 227e75d..42f40f7 100644 --- a/src/client/components/Library/Library.tsx +++ b/src/client/components/Library/Library.tsx @@ -194,7 +194,7 @@ export const Library = (): ReactElement => {

Library

- {!isUndefined(searchResults) ? ( + {!isUndefined(searchResults?.hits) ? (
{ back.
- {/*
-                {!isUndefined(searchResults?.code === 404 && !isLoading) &&
-                  JSON.stringify(
-                    searchResults.meta.body.error.root_cause,
+              {!isUndefined(searchResults?.data?.meta?.body) ? (
+                
+                  {JSON.stringify(
+                    searchResults.data.meta.body.error.root_cause,
                     null,
                     4,
                   )}
-              
*/} +
+ ) : null}
)}