Skip to content

Commit

Permalink
hide volume when it's zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Robiquet committed Mar 19, 2024
1 parent 509c112 commit 7426bee
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pages/api/og/generate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ export default async function GenerateOgImage(request: NextRequest) {
{ends}
</div>
</div>

{Number(volume) > 0 ? (
{Number(volume) > 0 && (
<div tw="flex flex-col">
<h2 tw={`font-bold ${"text-3xl"} font-sans`}>Volume:</h2>
<div
Expand All @@ -112,12 +111,7 @@ export default async function GenerateOgImage(request: NextRequest) {
{formatNumberCompact(Number(volume))} {currencyMetadata?.name}
</div>
</div>
) : (
<div tw="flex flex-col justify-center items-center">
<div tw={`font-bold ${"text-5xl"} font-sans`}>New!</div>
</div>
)}

<div tw="flex ml-auto mt-4">
<img
style={{
Expand Down

0 comments on commit 7426bee

Please sign in to comment.