From 1d2af2900bcad2a4ce27e04a74f13bfec69d40ec Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Tue, 4 Oct 2022 09:14:27 -0600 Subject: [PATCH] Remove spaces in hashtags & line clamp metadata --- common/contract-details.ts | 2 +- og-image/api/_lib/template.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/contract-details.ts b/common/contract-details.ts index c231b1e4..53a3ed97 100644 --- a/common/contract-details.ts +++ b/common/contract-details.ts @@ -30,7 +30,7 @@ export function contractTextDetails(contract: Contract) { const { closeTime, groupLinks } = contract const { createdDate, resolvedDate, volumeLabel } = contractMetrics(contract) - const groupHashtags = groupLinks?.slice(0, 5).map((g) => `#${g.name}`) + const groupHashtags = groupLinks?.map((g) => `#${g.name.replace(/ /g, '')}`) return ( `${resolvedDate ? `${createdDate} - ${resolvedDate}` : createdDate}` + diff --git a/og-image/api/_lib/template.ts b/og-image/api/_lib/template.ts index ec9264bf..caba2657 100644 --- a/og-image/api/_lib/template.ts +++ b/og-image/api/_lib/template.ts @@ -122,7 +122,7 @@ export function getHtml(parsedReq: ParsedRequest) {
-
+
${metadata}