Skip to content

Commit 492c6d0

Browse files
committed
Dashboard: NFT asset page UI updates (#7388)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR enhances the `TokenInfoUI` component by adding a new claim condition check, improving the UI for displaying NFT purchase availability, and restructuring the layout for better clarity. It also introduces a tabbed interface for viewing traits and purchasing options for ERC1155 tokens. ### Detailed summary - Added a new check for claim conditions in `TokenInfoUI`. - Introduced a "Not available for purchase" message when no claim conditions are set. - Implemented a tabbed interface for ERC1155 tokens to switch between traits and purchase options. - Reorganized the layout of the NFT details section for improved readability. - Adjusted spacing in the `BuyEditionDrop` form for consistency. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a tabbed interface for ERC1155 tokens, allowing users to switch between viewing traits and purchasing options. - Added badges displaying token type, token ID, and chain metadata for improved clarity. - **Improvements** - Enhanced handling of claim conditions, now clearly indicating when an NFT is not available for purchase. - Refined the display of NFT traits, showing a "No Traits" message if none exist. - Updated form and input styling for a cleaner and more consistent appearance. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 787118d commit 492c6d0

File tree

3 files changed

+212
-151
lines changed

3 files changed

+212
-151
lines changed

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-edition-drop/buy-edition-drop.client.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export function BuyEditionDrop(props: BuyEditionDropProps) {
184184

185185
return (
186186
<Form {...form}>
187-
<form className="space-y-5" onSubmit={handleSubmit}>
187+
<form className="space-y-4" onSubmit={handleSubmit}>
188188
<FormField
189189
control={form.control}
190190
name="amount"
@@ -215,7 +215,7 @@ export function BuyEditionDrop(props: BuyEditionDropProps) {
215215
}
216216
}
217217
}}
218-
className="!text-2xl h-auto bg-muted/50 font-bold"
218+
className="bg-muted/50"
219219
/>
220220
</FormControl>
221221
<FormMessage />

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nfts-grid.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,18 @@ function RenderClaimConditionInfo(props: {
282282
enabled: !props.isSkeleton,
283283
});
284284

285+
const noClaimConditionSet = !claimCondition.isPending && !claimCondition.data;
286+
287+
if (noClaimConditionSet) {
288+
return (
289+
<div>
290+
<p className="text-muted-foreground text-sm">
291+
Not available for purchase
292+
</p>
293+
</div>
294+
);
295+
}
296+
285297
return (
286298
<div className="flex flex-col items-start gap-0.5">
287299
<div className="flex items-center gap-1.5">

0 commit comments

Comments
 (0)