Skip to content

Commit

Permalink
fix: clickable addresses of issuers
Browse files Browse the repository at this point in the history
  • Loading branch information
shrutipanjwani committed Jul 15, 2024
1 parent 081be80 commit 45c20e8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
9 changes: 8 additions & 1 deletion src/components/bounty/BountyInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import CreateProof from '@/components/ui/CreateProof';

import { cancelOpenBounty, cancelSoloBounty } from '@/app/context/web3';
import { blacklistedBounties } from '@/constant/blacklist';
import Link from 'next/link';
//
function weiToEther(weiValue: string | number | bigint): string {
const etherValue = Number(weiValue) / 1e18;
Expand Down Expand Up @@ -114,7 +115,13 @@ const BountyInfo = ({ bountyId }: { bountyId: string }) => {
</p>
<p className='mt-5 normal-case break-all'>
bounty issuer:{' '}
{bountyData?.issuerDegenOrEnsName || bountyData?.issuer}
<Link
href={`/account/${bountyData?.issuer}`}
className='hover:text-gray-200'
>
{' '}
{bountyData?.issuerDegenOrEnsName || bountyData?.issuer}
</Link>
</p>
</div>

Expand Down
7 changes: 5 additions & 2 deletions src/components/bounty/ProofItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useBountyContext } from '@/components/bounty/BountyProvider';

import { acceptClaim, getURI, submitClaimForVote } from '@/app/context/web3';
import { applyBreakAllToLongWords } from '@/lib/uiHelpers';
import Link from 'next/link';

interface ProofItemProps {
id: string;
Expand Down Expand Up @@ -160,8 +161,10 @@ const ProofItem: React.FC<ProofItemProps> = ({
<div className='mt-2 py-2 flex flex-row justify-between text-sm border-t border-dashed'>
<span className=''>issuer</span>
<span className='flex flex-row'>
{issuerDegenOrEnsName ||
`$` + issuer.slice(0, 5) + '...' + issuer.slice(-6)}
<Link href={`/account/${issuer}`} className='hover:text-gray-200'>
{issuerDegenOrEnsName ||
`$` + issuer.slice(0, 5) + '...' + issuer.slice(-6)}
</Link>
<span className='ml-1'>
<button onClick={() => copyAddresstoClipboard(issuer)}>
<LiaCopySolid color='white' size={20} />
Expand Down
4 changes: 2 additions & 2 deletions src/components/bounty/ProofItemAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ const ProofItem: React.FC<ProofItemProps> = ({

<div className='mt-2 py-2 flex flex-row justify-between text-sm border-t border-dashed'>
<span className=''>issuer</span>
<span>
<Link href={`/account/${issuer}`} className='hover:text-gray-200'>
{issuerDegenOrEnsName ||
`$` + issuer.slice(0, 5) + '...' + issuer.slice(-6)}
</span>
</Link>
</div>
<div>claim id: {id}</div>
</div>
Expand Down

0 comments on commit 45c20e8

Please sign in to comment.