feat: manage press kit download via payload

This commit is contained in:
syntaxbullet
2026-06-22 13:11:35 +02:00
parent c5feeaee16
commit e21e2f1210
5 changed files with 17 additions and 3 deletions

View File

@@ -18,6 +18,7 @@ type PressIndexCms = Partial<typeof pressIndexContent> & {
hero?: Partial<typeof pressIndexContent.hero> & { image?: unknown }
events?: Partial<typeof pressIndexContent.events> & { collectionFallbackImage?: unknown }
news?: Partial<typeof pressIndexContent.news> & { collectionFallbackImage?: unknown }
downloads?: Partial<typeof pressIndexContent.downloads> & { kitFile?: unknown }
}
type PressEventItem = (typeof pressIndexContent.events.fallbackItems)[number]
@@ -575,7 +576,7 @@ const Press: React.FC = () => {
{/* Download button */}
<a
href={fallbackText(downloads.kitUrl, pressIndexContent.downloads.kitUrl)}
href={mediaUrl(downloads.kitFile, fallbackText(downloads.kitUrl, pressIndexContent.downloads.kitUrl))}
download={fallbackText(downloads.kitDownloadName, pressIndexContent.downloads.kitDownloadName)}
onMouseEnter={() => setDlHovered(true)}
onMouseLeave={() => setDlHovered(false)}