Skip to content

Commit

Permalink
Merge pull request #379 from picsoritdidnthappen/database-staging
Browse files Browse the repository at this point in the history
fix: issue with action buttons on claims
  • Loading branch information
picsoritdidnthappen authored Nov 15, 2024
2 parents 4f72e00 + 45556eb commit 49e2f8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/bounty/ClaimItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default function ClaimItem({
bountyId,
accepted,
url,
isVotingOrAcceptedBounty,
}: {
id: string;
title: string;
Expand All @@ -32,6 +33,7 @@ export default function ClaimItem({
bountyId: string;
accepted: boolean;
url: string;
isVotingOrAcceptedBounty: boolean;
}) {
const account = useAccount();
const [imageUrl, setImageUrl] = useState<string | null>(null);
Expand Down Expand Up @@ -189,7 +191,8 @@ export default function ClaimItem({
<div className='left-5 top-5 absolute flex flex-col text-white'>
{bounty.data &&
bounty.data.inProgress &&
account.address === bounty.data.issuer && (
account.address === bounty.data.issuer &&
!isVotingOrAcceptedBounty && (
<button
className='cursor-pointer mt-5 text-white hover:bg-[#F15E5F] border border-[#F15E5F] rounded-[8px] py-2 px-5'
onClick={() => {
Expand Down
4 changes: 4 additions & 0 deletions src/components/bounty/ClaimList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export default function ClaimList({
votingClaim: Claim | null;
isMultiplayer: boolean;
}) {
const isVotingOrAcceptedBounty =
!!votingClaim || claims.some((claim) => claim.accepted);
return (
<>
<div
Expand All @@ -42,6 +44,7 @@ export default function ClaimList({
issuer={votingClaim.issuer}
accepted={votingClaim.accepted}
url={votingClaim.url}
isVotingOrAcceptedBounty={isVotingOrAcceptedBounty}
/>
</div>
)}
Expand All @@ -66,6 +69,7 @@ export default function ClaimList({
issuer={claim.issuer}
accepted={claim.accepted}
url={claim.url}
isVotingOrAcceptedBounty={isVotingOrAcceptedBounty}
/>
</div>
))}
Expand Down

0 comments on commit 49e2f8c

Please sign in to comment.