diff --git a/packages/grant-explorer/src/features/round/ViewProjectDetails/ViewProjectDetails.tsx b/packages/grant-explorer/src/features/round/ViewProjectDetails/ViewProjectDetails.tsx index 31527c64b5..57ae451e3c 100644 --- a/packages/grant-explorer/src/features/round/ViewProjectDetails/ViewProjectDetails.tsx +++ b/packages/grant-explorer/src/features/round/ViewProjectDetails/ViewProjectDetails.tsx @@ -33,7 +33,8 @@ import { ProjectLogo, StakingBannerAndModal, } from "./components"; - +import { useGetApplicationStakes } from "./hooks/useGetApplicationStakes"; +import { useIsStakable } from "./components/StakingBannerAndModal/hooks/useIsStakable"; export default function ViewProjectDetails() { const [selectedTab, setSelectedTab] = useState(0); @@ -58,6 +59,11 @@ export default function ViewProjectDetails() { applicationId = paramApplicationId; } + const isStakableRound = useIsStakable({ + chainId: Number(chainId), + roundId, + }); + const { data: application, error, @@ -70,6 +76,13 @@ export default function ViewProjectDetails() { }, dataLayer ); + const { data: totalStaked } = useGetApplicationStakes( + Number(chainId), + Number(roundId), + application?.anchorAddress ?? "", + isStakableRound + ); + const { round: roundDetails } = useRoundById(Number(chainId), roundId); const projectToRender = application && mapApplicationToProject(application); @@ -218,12 +231,15 @@ export default function ViewProjectDetails() { )} -