Skip to content

Commit

Permalink
fix for prod (#2797)
Browse files Browse the repository at this point in the history
must be adjusted for later #2796
  • Loading branch information
millianapia authored Feb 4, 2025
1 parent 41b6bc7 commit 6517fd1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions web/pageComponents/pageTemplates/News.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ const NewsPage = ({ data: news }: ArticleProps) => {
const openGraphImages = getOpenGraphImages((openGraphImage?.asset ? openGraphImage : null) || heroImage?.image)
/* appInsights.trackPageView({ name: slug, uri: fullUrl }) */

const formattedContent = content.map(block => ({
const formattedContent = content.map((block) => ({
...block,
markDefs: block.markDefs || [],
}));
markDefs: block.markDefs || [],
}))

return (
<>
Expand Down Expand Up @@ -204,21 +204,25 @@ const NewsPage = ({ data: news }: ArticleProps) => {
)}
</HeaderInner>
</Header>
{heroImage.asset && <Image><DefaulHeroImage data={heroImage} /></Image>}
{heroImage && (
<Image>
<DefaulHeroImage data={heroImage} />
</Image>
)}
{ingress && ingress.length > 0 && (
<LeadParagraph>
<IngressText value={ingress} includeFootnotes />
</LeadParagraph>
)}

{content && content.length > 0 && (
{content && content.length > 0 && (
<Blocks
value={formattedContent}
proseClassName="prose-article"
className="p-0 max-w-viewport mx-auto"
includeFootnotes
/>
)}
)}
<div className="mt-8 mb-2 px-layout-lg max-w-viewport mx-auto">
<Footnotes blocks={[...ingress, ...content]} />
</div>
Expand Down

0 comments on commit 6517fd1

Please sign in to comment.