Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

Bugfix: Add optional prop for include ' | TypeHero' in OG image (#735)

Maxwell DeMaio5d37a15f2dc2
diff --git a/apps/og-image/app/api/challenge/route.tsx b/apps/og-image/app/api/challenge/route.tsx
index 12233739..19e47175 100644
--- a/apps/og-image/app/api/challenge/route.tsx
+++ b/apps/og-image/app/api/challenge/route.tsx
@@ -81,7 +81,7 @@ export async function GET(req: Request) {
tw="text-7xl font-bold truncate pr-48 -mt-2 overflow-ellipsis"
style={{ fontWeight: '800 !important' }}
>
- {props.title}
+ {props.title === null ? null : props.title.split(" | ")[0]}
</h1>
<p tw="flex items-center -mt-3">
<p