Skip to content

Commit

Permalink
Merge pull request #4788 from Giveth/3667_hide_givpower_rank_for_not_…
Browse files Browse the repository at this point in the history
…givback_eligible_projects

Hide giv power rank in not givback eligible projects
  • Loading branch information
mohammadranjbarz authored Sep 26, 2024
2 parents a12b027 + c6711da commit db71b97
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/views/project/projectGIVPower/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const itemPerPage = 10;
const ProjectGIVPowerIndex: FC<IProjectGIVPowerIndexProps> = () => {
const [page, setPage] = useState(0);

const { isBoostingsLoading, boostersData } = useProjectContext();
const { isBoostingsLoading, boostersData, projectData } =
useProjectContext();
const hasGivPower = boostersData ? boostersData.totalCount > 0 : false;

if (isBoostingsLoading) return <WrappedSpinner size={250} />;
Expand Down Expand Up @@ -56,9 +57,11 @@ const ProjectGIVPowerIndex: FC<IProjectGIVPowerIndexProps> = () => {
/>
</Flex>
</Col>
<Col lg={4}>
<GIVpowerCard />
</Col>
{projectData?.isGivbackEligible && (
<Col lg={4}>
<GIVpowerCard />
</Col>
)}
</Row>
</>
) : (
Expand Down

0 comments on commit db71b97

Please sign in to comment.