Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix/og image desc (#2379)
Browse files Browse the repository at this point in the history
* fix og image desc

* fix: og image desc
  • Loading branch information
alantoa authored Aug 18, 2023
1 parent 7747861 commit 093a0ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/next/src/pages/api/drop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default async function handler(req: NextRequest) {
image = image + "?class=ogimage";
}
const pfp = nft?.creator_img_url;
const desc = nft?.token_description;
const desc = nft?.token_description ?? "";
const gatingType = nft?.gating_type;

return new ImageResponse(
Expand Down Expand Up @@ -267,7 +267,8 @@ export default async function handler(req: NextRequest) {
"-webkit-box-orient": "vertical",
}}
>
{desc}
{/* We need to convert it because the description is in rich text format, and sometimes emojis cannot be shown. */}
{JSON.stringify(desc).slice(1, -1)}
</div>

<div
Expand Down

0 comments on commit 093a0ef

Please sign in to comment.