Skip to content

Commit

Permalink
Add opensea link reading the contract from API (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pabl0cks authored Dec 16, 2024
1 parent 02bb65b commit 65969ae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/nextjs/pages/batches/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ interface BatchData {
telegramLink: string;
startDate: number;
contractAddress: string;
nftContractAddress: string;
totalParticipants: number;
graduates: number;
batchPageLink?: string;
Expand Down Expand Up @@ -236,6 +237,15 @@ const Batches = ({ batchData, openBatchNumber }: PageProps) => {
>
<Image src="/assets/github-logo.png" alt="GitHub" width={24} height={24} />
</TrackedLink>
{batch.nftContractAddress && batch.graduates > 0 && (
<TrackedLink
id={`${batch.name}-opensea`}
href={`https://opensea.io/assets/optimism/${batch.nftContractAddress}`}
className="btn btn-xs btn-ghost p-0 min-h-0 w-[24px] h-[24px] hover:opacity-80 flex items-center justify-center"
>
<Image src="/assets/opensea-logo.svg" alt="OpenSea" width={24} height={24} />
</TrackedLink>
)}
</div>
</div>
</div>
Expand Down

0 comments on commit 65969ae

Please sign in to comment.