From 6d450366e3b4e3122a0037398f8170f1a47649eb Mon Sep 17 00:00:00 2001 From: Malik Aghiles Tahir Date: Tue, 18 Jun 2024 17:59:20 -0400 Subject: [PATCH] feat: make the whole grant applicant card clickable --- .../components/GrantApplicantCard.tsx | 156 +++++++++++------- 1 file changed, 98 insertions(+), 58 deletions(-) diff --git a/src/pages/grants/grantsPage/components/GrantApplicantCard.tsx b/src/pages/grants/grantsPage/components/GrantApplicantCard.tsx index ac3fd3195..9da792105 100644 --- a/src/pages/grants/grantsPage/components/GrantApplicantCard.tsx +++ b/src/pages/grants/grantsPage/components/GrantApplicantCard.tsx @@ -72,6 +72,8 @@ const UserContributionDetails = ({ amount, voteCount, user }: GrantApplicantCont display="flex" alignItems="center" justifyContent="space-between" + cursor="default" + zIndex={2} > - + { + e.stopPropagation() + contributorsModal.onOpen() + }} + zIndex={2} + > {currentContributor && ( { if (!isLoggedIn || !currentUser?.hasSocialAccount) { return ( - ) @@ -225,7 +248,18 @@ export const GrantApplicantCard = ({ if (canVote && isLoggedIn && currentUser?.hasSocialAccount) { return ( - ) @@ -233,76 +267,82 @@ export const GrantApplicantCard = ({ if (grantStatus !== GrantStatusEnum.Closed) { return ( - ) } } + const handleCardClick = () => { + window.location.href = projectLink + } + return ( - - - - - - - - - + + + + + + + + +

{project.title}

- - {project.shortDescription} - +
+ {!isMobile && ( + + {renderButton(project)} + {(grantHasVoting || isClosed) && renderWidgetItem(funding, contributorsCount)} + + )}
- {!isMobile && ( - + + {isMobile && ( + {renderButton(project)} {(grantHasVoting || isClosed) && renderWidgetItem(funding, contributorsCount)} - + )} -
- - {isMobile && ( - - {renderButton(project)} - {(grantHasVoting || isClosed) && renderWidgetItem(funding, contributorsCount)} - - )} - {currentUserContribution && } - -
+ {currentUserContribution && } + + +
) }