From 77e16027470f85b679b90b068c5269586eecbb08 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 23 Feb 2024 14:19:44 +0800 Subject: [PATCH] Handle error + empty library states --- .../components/templates/homeFeed/HomeFeedContainer.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx b/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx index eeaa1411f..eab588201 100644 --- a/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx +++ b/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx @@ -115,7 +115,7 @@ export function HomeFeedContainer(): JSX.Element { error: fetchItemsError, } = useGetLibraryItemsQuery(queryInputs) - console.log('fetchItemsError: ', fetchItemsError) + console.log('fetchItemsError fetchItemsError: ', fetchItemsError) useEffect(() => { const handleRevalidate = () => { @@ -973,6 +973,8 @@ function HomeFeedGrid(props: HomeFeedContentProps): JSX.Element { return true }, [props]) + console.log('props.fetchItemsError', props.fetchItemsError) + return ( )} - {props.fetchItemsError && } - {!props.isValidating && props.items.length <= 0 && ( + {!showItems && props.fetchItemsError && } + {!showItems && !props.fetchItemsError && props.items.length <= 0 && ( {