Skip to content

Commit

Permalink
better handling of unapproved projects (#3731)
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobHomanics authored Dec 9, 2024
1 parent dbca8a2 commit 8996d73
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/grant-explorer/src/features/round/ViewProjectDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -230,7 +234,7 @@ export default function ViewProjectDetails() {
),
},
],
[stats, grants, projectToRender, description]
[stats, grants, projectToRender, description, isLoading]
);

const handleTabChange = (tabIndex: number) => {
Expand Down Expand Up @@ -283,7 +287,9 @@ export default function ViewProjectDetails() {
/>
)}
<div className="flex-1">
{error === undefined ? (
{error === undefined &&
!isLoading &&
projectToRender !== undefined ? (
<>
<Skeleton isLoaded={Boolean(title)}>
<h1 className="text-4xl font-modern-era-medium tracking-tight text-grey-500">
Expand All @@ -301,7 +307,7 @@ export default function ViewProjectDetails() {
</div>
</>
) : (
<p>Couldn't load project data.</p>
<p>Couldn't load project data. It may not exist.</p>
)}
</div>
</div>
Expand Down

0 comments on commit 8996d73

Please sign in to comment.