From 8996d73eff427dd7e43c5f9d468800a8a54fc7b5 Mon Sep 17 00:00:00 2001 From: Jacob Homanics Date: Mon, 9 Dec 2024 14:37:36 -0600 Subject: [PATCH] better handling of unapproved projects (#3731) --- .../src/features/round/ViewProjectDetails.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/grant-explorer/src/features/round/ViewProjectDetails.tsx b/packages/grant-explorer/src/features/round/ViewProjectDetails.tsx index e3f12f080..3e0e6c7ae 100644 --- a/packages/grant-explorer/src/features/round/ViewProjectDetails.tsx +++ b/packages/grant-explorer/src/features/round/ViewProjectDetails.tsx @@ -102,7 +102,11 @@ export default function ViewProjectDetails() { applicationId = paramApplicationId; } - const { data: application, error } = useApplication( + const { + data: application, + error, + isLoading, + } = useApplication( { chainId: Number(chainId as string), roundId, @@ -230,7 +234,7 @@ export default function ViewProjectDetails() { ), }, ], - [stats, grants, projectToRender, description] + [stats, grants, projectToRender, description, isLoading] ); const handleTabChange = (tabIndex: number) => { @@ -283,7 +287,9 @@ export default function ViewProjectDetails() { /> )}
- {error === undefined ? ( + {error === undefined && + !isLoading && + projectToRender !== undefined ? ( <>

@@ -301,7 +307,7 @@ export default function ViewProjectDetails() {

) : ( -

Couldn't load project data.

+

Couldn't load project data. It may not exist.

)}