Skip to content

Commit

Permalink
fix: logic and ui in RareSatsTabGridItem component (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
fedeerbes committed Nov 29, 2023
1 parent 13092a2 commit e574270
Show file tree
Hide file tree
Showing 9 changed files with 365 additions and 53 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@ledgerhq/hw-transport-webusb": "^6.27.13",
"@phosphor-icons/react": "^2.0.10",
"@react-spring/web": "^9.6.1",
"@secretkeylabs/xverse-core": "3.1.1-e148aa5",
"@secretkeylabs/xverse-core": "4.0.0",
"@stacks/connect": "^6.10.2",
"@stacks/encryption": "4.3.5",
"@stacks/stacks-blockchain-api-types": "6.1.1",
Expand Down
21 changes: 17 additions & 4 deletions src/app/components/exoticSatsRow/exoticSatsRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ function ExoticSatsRow({
satAmount,
inscriptions,
icons,
showNumberOfInscriptions = false,
}: {
title: string;
satAmount: number;
inscriptions: SatRangeInscription[];
showNumberOfInscriptions?: boolean;
icons: ReactNode;
}) {
const { t } = useTranslation('translation', { keyPrefix: 'COMMON' });
Expand All @@ -90,14 +92,25 @@ function ExoticSatsRow({
</StyledBundleSub>
)}
/>
{inscriptions.map((inscription) => (
<Row key={inscription.id}>
{showNumberOfInscriptions && inscriptions.length ? (
<Row>
<img src={OrdinalIcon} alt="ordinal" />
<InscriptionText typography="body_medium_m" color="white_0">
{inscription.inscription_number}
{inscriptions.length > 1
? `+${inscriptions.length}`
: inscriptions[0].inscription_number}
</InscriptionText>
</Row>
))}
) : (
inscriptions.map((inscription) => (
<Row key={inscription.id}>
<img src={OrdinalIcon} alt="ordinal" />
<InscriptionText typography="body_medium_m" color="white_0">
{inscription.inscription_number}
</InscriptionText>
</Row>
))
)}
</InfoContainer>
<IconsContainer>{icons}</IconsContainer>
</ItemContainer>
Expand Down
Loading

0 comments on commit e574270

Please sign in to comment.