Skip to content

Commit c137bd4

Browse files
committed
fix: handle unlimited supply, show royalties of the collection, and route back to the details page after a mint.
1 parent 0ea280f commit c137bd4

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/app/(project)/projects/[project]/drops/MintEdition.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export default function MintEdition({ project, drop }: MintEditionProps) {
7979
{ query: GetCollectionHolders, variables: { project, drop } },
8080
{ query: GetCollectionPurchases, variables: { project, drop } },
8181
],
82+
onCompleted: () => {
83+
router.back();
84+
}
8285
}
8386
);
8487

src/app/(project)/projects/[project]/drops/[drop]/Drop.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,18 @@ export default function Drop({ children, project, drop }: DropProps): JSX.Elemen
172172
<div className="w-full text-xs font-medium">
173173
<div className="flex items-center justify-between">
174174
<span className="text-white">
175-
{`Status: ${dropQuery.data?.project?.drop?.status} - ${dropQuery.data?.project?.drop?.collection?.totalMints}/
176-
${dropQuery.data?.project?.drop?.collection?.supply}`}
175+
Status: {dropQuery.data?.project?.drop?.status} -
176+
{dropQuery.data?.project?.drop?.collection?.totalMints}
177+
{dropQuery.data?.project?.drop?.collection?.supply &&
178+
`/ ${dropQuery.data?.project?.drop?.collection?.supply}`}
177179
<span className="text-gray-500"> - minted</span>
178180
</span>
179181
{inTheFuture(startTime) ? (
180182
<span className="text-gray-400">{daysUntil(startTime)} to start</span>
181183
) : (
182-
<span>{`${percent}%`}</span>
184+
dropQuery.data?.project?.drop?.collection?.supply && (
185+
<span>{`${percent}%`}</span>
186+
)
183187
)}
184188
</div>
185189
<div className="w-full rounded-full h-[12px] bg-stone-800 mt-1 relative overflow-hidden">
@@ -245,7 +249,7 @@ export default function Drop({ children, project, drop }: DropProps): JSX.Elemen
245249
<div className="basis-1/2 h-full flex flex-col px-4 gap-2 text-sm">
246250
<div className="flex items-center justify-between gap-2">
247251
<span className="text-gray-400">Royalties</span>
248-
<span>{dropData?.collection.sellerFeeBasisPoints}</span>
252+
<span>{dropData?.collection.royalties}</span>
249253
</div>
250254
<div className="flex items-center justify-between gap-2">
251255
<span className="text-gray-400">Royalties recipients</span>

src/components/Table.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ function PurchaseStatusPill({ status, className }: PurchaseStatusPillProps) {
222222
className={clsx('rounded-full py-1 px-3 text-xs font-medium max-w-min', className, {
223223
'bg-blue-400 bg-opacity-20 text-blue-400': status === CreationStatus.Pending,
224224
'bg-green-400 bg-opacity-20 text-green-400': status === CreationStatus.Created,
225+
'bg-red-500 bg-opacity-20 text-red-500': status === CreationStatus.Failed,
225226
})}
226227
>
227228
{label}

0 commit comments

Comments
 (0)