Skip to content

Commit

Permalink
pass through color for commentary card
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane98c committed Jan 15, 2025
1 parent defbc42 commit 0d6bc36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pages/api/og/commentary.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export default async function handler(req) {
throw new Error(`Commentary not found for id: ${id}`)
}

const { title, date, collapseCardAuthors, titleWidthOverride } = commentary
const { title, date, collapseCardAuthors, titleWidthOverride, color } =
commentary
const authors = commentary.authors.map((author) =>
typeof author === 'string' ? author : author?.name || ''
)
Expand All @@ -32,6 +33,7 @@ export default async function handler(req) {
authors,
collapseCardAuthors: collapseCardAuthorsParam || collapseCardAuthors,
titleWidthOverride: titleWidthOverrideParam || titleWidthOverride,
color,
})

return new ImageResponse(component, {
Expand Down

0 comments on commit 0d6bc36

Please sign in to comment.