@@ -76,9 +76,7 @@ interface HomePageProps {
7676 communitySubtitle : string ;
7777 communityLinksTranslations : { title : string ; description : string } [ ] ;
7878 } ;
79- events : ( Omit < CalendarEvent , "schedule" > & {
80- schedule : CalendarEvent [ "schedule" ] & { from : string ; to : string } ;
81- } ) [ ] ;
79+ events : CalendarEvent [ ] ;
8280 firstFeaturedEventIndex : number ;
8381 videos : YouTubePlaylistItem [ ] ;
8482 news : PostItem [ ] ;
@@ -130,8 +128,8 @@ export function HomePage({
130128 return eventDate >= oneWeekAgo ;
131129 } )
132130 . sort ( ( a , b ) => {
133- const dateA = new Date ( a . schedule . from ) . getTime ( ) ;
134- const dateB = new Date ( b . schedule . from ) . getTime ( ) ;
131+ const dateA = new Date ( a . schedule . from ?? 0 ) . getTime ( ) ;
132+ const dateB = new Date ( b . schedule . from ?? 0 ) . getTime ( ) ;
135133 return dateA - dateB ;
136134 } ) ;
137135 } , [ events ] ) ;
@@ -212,8 +210,8 @@ export function HomePage({
212210 key = { event . key }
213211 imageSrc = { event . img . primary || defaultImg . src }
214212 title = { event . title }
215- date = { event . schedule . from }
216- location = { event . venue . city || event . venue . address }
213+ date = { event . schedule . from ?? undefined }
214+ location = { event . venue . city ?? event . venue . address ?? undefined }
217215 href = { event . rsvp }
218216 className = "px-1"
219217 />
@@ -279,7 +277,7 @@ export function HomePage({
279277 < BigBannerCard
280278 key = { item . id }
281279 className = "px-1"
282- imageSrc = { item . heroImage }
280+ imageSrc = { item . heroImage ?? "" }
283281 title = { item . title }
284282 description = { item . description }
285283 href = { item . url }
@@ -299,8 +297,11 @@ export function HomePage({
299297 { videos . map ( ( item ) => (
300298 < BigVideoCard
301299 key = { item . id }
302- id = { item . contentDetails . videoId }
303- thumbnail = { item . snippet . thumbnails . maxres . url }
300+ id = { item . contentDetails ?. videoId ?? "" }
301+ thumbnail = {
302+ item . snippet . thumbnails . maxres ?. url ??
303+ item . snippet . thumbnails . high . url
304+ }
304305 alt = { item . snippet . title }
305306 className = "px-1"
306307 title = { item . snippet . title }
0 commit comments