Skip to content

Commit

Permalink
Add graduates to the table, hide opensea link if 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Pabl0cks committed Nov 28, 2024
1 parent 7409c2d commit a125705
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/nextjs/pages/batches/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface BatchData {
startDate: number;
contractAddress: string;
totalParticipants: number;
graduates: number;
batchPageLink?: string;
githubRepoLink?: string;
openseaLink?: string | null;
Expand Down Expand Up @@ -201,6 +202,7 @@ const Batches = ({ batchData, openBatchNumber }: PageProps) => {
<th className="py-3 px-2 xs:px-4">Batch</th>
<th className="py-3 px-2 xs:px-4 hidden lg:table-cell">Start Date</th>
<th className="py-3 px-2 xs:px-4 hidden sm:table-cell">Participants</th>
<th className="py-3 px-2 xs:px-4 hidden sm:table-cell">Graduates</th>
<th className="py-3 px-2 xs:px-4">Links</th>
</tr>
</thead>
Expand All @@ -213,6 +215,7 @@ const Batches = ({ batchData, openBatchNumber }: PageProps) => {
<td className="py-3 px-2 xs:px-4">{batch.name}</td>
<td className="py-3 px-2 xs:px-4 hidden lg:table-cell">{formatDate(batch.startDate)}</td>
<td className="py-3 px-2 xs:px-4 hidden sm:table-cell">{batch.totalParticipants}</td>
<td className="py-3 px-2 xs:px-4 hidden sm:table-cell">{batch.graduates || "-"}</td>
<td className="py-3 px-2 xs:px-4">
<div className="flex justify-center">
<div className="w-[120px] flex items-center gap-2">
Expand All @@ -231,7 +234,7 @@ const Batches = ({ batchData, openBatchNumber }: PageProps) => {
>
<Image src="/assets/github-logo.png" alt="GitHub" width={24} height={24} />
</TrackedLink>
{batch.openseaLink && (
{batch.openseaLink && batch.graduates > 0 && (
<TrackedLink
id={`${batch.name}-opensea`}
href={batch.openseaLink || ""}
Expand Down

0 comments on commit a125705

Please sign in to comment.