Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions frontend/src/app/[locale]/positions/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ async function fetchPositionPageData() {
},
thumbnail: {
populate: '*'
},
article_file: {
fields: ['url']
}
}
},
Expand All @@ -44,6 +47,9 @@ async function fetchPositionPageData() {
},
thumbnail: {
populate: '*'
},
article_file: {
fields: ['url']
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/[locale]/positions/positions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function transformResources(resources: NonNullable<PositionsPageData['resources'
title: isBlog ? (resource.blog as { title: string })?.title || '' : (resource.press_release as { title: string })?.title || '',
tags: isBlog ? [new Date(resource.blog?.published_date || '').toLocaleString(undefined, { month: 'short', day: 'numeric', year: 'numeric' })] : [new Date(resource.press_release?.published_date || '').toLocaleString(undefined, { month: 'short', day: 'numeric', year: 'numeric' }), resource.press_release?.media_name],
image: isBlog ? resource.blog?.thumbnail?.url || '/images/dataforgood.svg' : resource.press_release?.thumbnail?.url || "/images/dataforgood.svg",
link: isBlog ? `/blog/${resource.blog?.slug || ''}` : getPressReleaseLink(resource as { press_release_type: string; article_link: string; article_file: {url: string;}}) || '',
link: isBlog ? `/blog/${resource.blog?.slug || ''}` : getPressReleaseLink(resource.press_release as { press_release_type: string; article_link: string; article_file: {url: string;}}) || '',
subInfos: isBlog ? (resource.blog as { tags: string[] })?.tags?.map((tag) => tag.name) || [] : (resource.press_release as { tags: string[] })?.tags || [],
isBlank: true,
}
Expand Down
Loading