From a5cd66439c374d7444b96ec1b55c2a4d72a2552b Mon Sep 17 00:00:00 2001 From: MananTank Date: Thu, 5 Jun 2025 18:44:04 +0000 Subject: [PATCH] [TOOL-4687] Dashboard: Show Special Price UI in claim tokens card (#7284) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR focuses on improving the `RecentTransfers` and `ClaimTokenCardUI` components in a React application by refining state management, simplifying logic, and enhancing UI elements. ### Detailed summary - Removed `hasFetchedOnce` state in `RecentTransfers`. - Changed condition for disabling the button in `RecentTransfersUI`. - Simplified logic for claim parameters in `ClaimTokenCardUI`. - Introduced `TokenPrice` component to handle price display. - Added tooltip for special pricing indication. - Adjusted UI elements for better clarity and organization. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../erc20/_components/RecentTransfers.tsx | 14 +-- .../claim-tokens/claim-tokens-ui.tsx | 97 +++++++++++++------ 2 files changed, 72 insertions(+), 39 deletions(-) diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/RecentTransfers.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/RecentTransfers.tsx index 02c7eb1d589..10ce5e4b37a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/RecentTransfers.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/RecentTransfers.tsx @@ -18,7 +18,7 @@ import { ChevronRightIcon, ExternalLinkIcon, } from "lucide-react"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import { type ThirdwebClient, type ThirdwebContract, toTokens } from "thirdweb"; import type { ChainMetadata } from "thirdweb/chains"; import { @@ -171,7 +171,7 @@ function RecentTransfersUI(props: {