Skip to content

Commit

Permalink
Merge branch 'armando/grwth-4027-update-explorer-collectionasset-og-i…
Browse files Browse the repository at this point in the history
…mage-to-serve-a-similiar' into dev
  • Loading branch information
r3lays committed Feb 13, 2024
2 parents 423abc7 + 5162e07 commit 36c7a86
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 46 deletions.
1 change: 0 additions & 1 deletion pages/[chain]/asset/[assetId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ const IndexPage: NextPage<Props> = ({ assetId, ssr }) => {

const base64EncodedToken = btoa(JSON.stringify(token))

console.log(`/api/og/token?token=${encodeURIComponent(base64EncodedToken)}`)
return (
<Layout>
<Head
Expand Down
94 changes: 49 additions & 45 deletions pages/api/og/token/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,57 +197,61 @@ export default async function handler(request: NextRequest) {
gap: '50px',
}}
>
<div
style={{
display: 'flex',
flexDirection: 'column',
gap: '12px',
justifyContent: 'center',
}}
>
<span
style={{
fontSize: '32px',
fontFamily: 'Regular',
}}
>
Floor
</span>
<span
style={{
fontSize: '40px',
}}
>
{token.market?.floorAsk?.price?.amount?.native} {' '}
{token.market?.floorAsk?.price?.currency?.symbol?.toUpperCase()}
</span>
</div>
<div
style={{
display: 'flex',
gap: '12px',
flexDirection: 'column',
justifyContent: 'center',
}}
>
<span
{token.market?.floorAsk?.price?.amount?.native && (
<div
style={{
fontSize: '32px',
fontFamily: 'Regular',
display: 'flex',
flexDirection: 'column',
gap: '12px',
justifyContent: 'center',
}}
>
Best Offer
</span>
<span
<span
style={{
fontSize: '32px',
fontFamily: 'Regular',
}}
>
Floor
</span>
<span
style={{
fontSize: '40px',
}}
>
{token.market?.floorAsk?.price?.amount?.native} {' '}
{token.market?.floorAsk?.price?.currency?.symbol?.toUpperCase()}
</span>
</div>
)}
{token.market?.topBid?.price?.amount?.native && (
<div
style={{
fontSize: '40px',
display: 'flex',
gap: '12px',
flexDirection: 'column',
justifyContent: 'center',
}}
>
{token.market?.topBid?.price?.amount?.native?.toFixed(2)}{' '}
{' '}
{token.market?.floorAsk?.price?.currency?.symbol?.toUpperCase()}
</span>
</div>
<span
style={{
fontSize: '32px',
fontFamily: 'Regular',
}}
>
Best Offer
</span>
<span
style={{
fontSize: '40px',
}}
>
{token.market?.topBid?.price?.amount?.native?.toFixed(2)}
{' '}
{token.market?.floorAsk?.price?.currency?.symbol?.toUpperCase()}
</span>
</div>
)}
</div>
<div
style={{
Expand Down

0 comments on commit 36c7a86

Please sign in to comment.