Skip to content

Commit 2a93333

Browse files
authored
Merge pull request #25 from rickknowlton/main
feat: conditional rendering on slider component
2 parents f06ceb5 + 8e66b6c commit 2a93333

File tree

6 files changed

+17
-3
lines changed

6 files changed

+17
-3
lines changed
74.6 MB
Binary file not shown.
74.5 MB
Binary file not shown.

src/components/hero/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const Hero: React.FC<{ heroTree: ExpandedHeroTree }> = ({ heroTree }) => {
6060
{fill(hero.remaining, data)}
6161
</div>
6262
</div>
63+
{tenkData.mintRateLimit > 1 && (
6364
<Slider
6465
max={Math.min(
6566
tenkData.remainingAllowance ?? tenkData.mintRateLimit,
@@ -70,6 +71,7 @@ const Hero: React.FC<{ heroTree: ExpandedHeroTree }> = ({ heroTree }) => {
7071
onValueChange={([v]) => setNumberToMint(v)}
7172
value={[numberToMint]}
7273
/>
74+
)}
7375
</>
7476
)}
7577
<button className={css.cta}>

src/components/my-nfts/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,16 @@ const MyNFTs: React.FC<{
7171
<button
7272
key={nft.token_id}
7373
className={css.nft}
74+
style={{ backgroundImage: `url("${nft?.media}")`, backgroundRepeat: "no-repeat", backgroundSize: "contain" }}
7475
onClick={() => {
7576
setPhotoIndex(index)
7677
setLightboxOpen(true)
7778
}}
7879
>
79-
<div style={{ backgroundImage: `url("${nft.media}")` }} />
80+
<div/>
8081
<span className="visually-hidden">{nft.metadata?.description}</span>
8182
<footer>
82-
<span>#{nft.token_id}</span>
83+
<span className={css.chip}>{nft.token_id}</span>
8384
{highlight?.includes(nft.token_id) && (
8485
<span className={css.highlight}>{locale.new}</span>
8586
)}

src/components/my-nfts/my-nfts.module.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@
7979
font-weight: var(--fw-bold);
8080
}
8181

82+
.chip {
83+
color: var(--white);
84+
background: rgba(0, 0, 0, 0.5);
85+
padding: 0.5em 0.5em 0.5em;
86+
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
87+
backdrop-filter: blur(19.5px);
88+
-webkit-backdrop-filter: blur(19.5px);
89+
border-radius: 10px;
90+
border: 1px solid rgba(255, 255, 255, 0.10);
91+
}
92+
8293
.nft>div:first-child {
8394
--aspect-ratio: 1 / 1;
8495
background-color: var(--gray-1);

stale-data-from-build-time.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)