@@ -14,6 +14,7 @@ export default function Homepage({ data }: HomepageProps) {
1414
1515 const heroData = {
1616 image : data . hero ?. image ?. url ,
17+ imageCredit : data . hero ?. image ?. caption ?? null ,
1718 title : {
1819 level : 1 as TitleProps [ 'level' ] ,
1920 variant : "big" as TitleProps [ 'variant' ] ,
@@ -36,6 +37,7 @@ export default function Homepage({ data }: HomepageProps) {
3637 const projects = data . featured_projects ?. map ( project => ( {
3738 id : ( project . id ?? "" ) . toString ( ) ,
3839 src : project . thumbnail ?. url || '' ,
40+ credit : project . thumbnail ?. caption ?? null ,
3941 title : project . title || '' ,
4042 alt : project . title || '' ,
4143 description : project . short_description || '' ,
@@ -56,6 +58,7 @@ export default function Homepage({ data }: HomepageProps) {
5658 title : event . name || '' ,
5759 date : new Date ( event . date || '' ) . toLocaleString ( undefined , { month : 'short' , day : 'numeric' , year : 'numeric' , hour : 'numeric' } ) ,
5860 image : event . image ?. url ,
61+ imageCredit : event . image ?. caption ?? null ,
5962 tag : [ t ( 'events.tag' ) ] ,
6063 link : event . link || '' ,
6164 } ) ) . filter ( event => event . title && event . link ) ?? [ ] ;
@@ -69,6 +72,7 @@ export default function Homepage({ data }: HomepageProps) {
6972 author : isBlog ? ( ( resource . blog ?. author as { name : string } ) ?. name || t ( 'resources.defaultAuthor' ) ) : ( resource . press_release as { media_name : string } ) ?. media_name || '' ,
7073 talk : isBlog ? ( resource . blog as { title : string } ) ?. title || '' : ( resource . press_release as { title : string } ) ?. title || '' ,
7174 image : isBlog ? resource . blog ?. thumbnail ?. url || '' : resource . press_release ?. thumbnail ?. url || '' ,
75+ imageCredit : isBlog ? ( resource . blog ?. thumbnail ?. caption ?? null ) : ( resource . press_release ?. thumbnail ?. caption ?? null ) ,
7276 ctaText : isBlog ? t ( 'resources.articleCtaText' ) : t ( 'resources.pressCtaText' ) ,
7377 ctaLink : isBlog ? `/articles/${ resource . blog ?. slug || '' } ` : ( resource . press_release as { article_link : string } ) ?. article_link || '' ,
7478 }
@@ -87,6 +91,7 @@ export default function Homepage({ data }: HomepageProps) {
8791 talk : thematic . short_description || '' ,
8892 talkOffset : 10 ,
8993 image : thematic . thumbnail ?. url || '' ,
94+ imageCredit : thematic . thumbnail ?. caption ?? null ,
9095 ctaText : thematic . cta_text ,
9196 ctaLink : thematic . cta_link ,
9297 } ) ) . filter ( thematic => thematic . talk ) ?? [ ] ;
0 commit comments