diff --git a/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.module.scss b/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.module.scss index b7e41cf23..a36265268 100644 --- a/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.module.scss +++ b/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.module.scss @@ -15,7 +15,7 @@ } } - @media (max-width: 750px) { + @media (width <= 750px) { .transactionLiteBoxHeaderAddr { width: 200px; display: inline-block; @@ -27,7 +27,7 @@ color: var(--primary-color); font-size: 12px; padding: 2px 6px; - box-shadow: 0px 4px 4px rgba(16, 16, 16, 0.05); + box-shadow: 0 4px 4px rgb(16 16 16 / 5%); border: 1px solid #caffdf; border-radius: 4px; display: inline-block; @@ -90,7 +90,7 @@ } } - @media (max-width: 750px) { + @media (width <= 750px) { & > div { display: inline-block; @@ -108,7 +108,7 @@ } .tag { - padding: 2px 2px; + padding: 2px; margin-right: 2px; } } diff --git a/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.tsx b/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.tsx index 0a37ae944..5b228c09d 100644 --- a/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.tsx +++ b/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.tsx @@ -12,6 +12,17 @@ import { defaultTransactionLiteDetails } from '../../state' import { TransactionBadge } from './TransactionBadge' import { fetchTransactionLiteDetailsByHash } from '../../../../services/ExplorerService/fetcher' +const getTransferItemTag = (transfer: State.LiteTransfer) => { + const { cellType, udtInfo, mNftInfo } = transfer + if (cellType === 'm_nft_token') { + return `NFT-${mNftInfo?.className ?? 'Unknown'}` + } + if (cellType === 'udt') { + return udtInfo?.displayName || `Uknown Asset #${udtInfo?.typeHash.substring(udtInfo.typeHash.length - 4)}` + } + return 'CKB' +} + export const TransactionCompLite: FC<{ isCellbase: boolean }> = ({ isCellbase }) => { const { hash: txHash } = useParams<{ hash: string }>() @@ -33,21 +44,12 @@ export const TransactionCompLite: FC<{ isCellbase: boolean }> = ({ isCellbase })