@@ -361,7 +361,7 @@ function MostRecentFeaturedCard({ article }: { article: Article }) {
361361 const [ coverImageLoaded , setCoverImageLoaded ] = useState ( false ) ;
362362 const hasCoverImage = ! coverImageError ;
363363 const displayDate = article . date ;
364- const avatarUrl = AUTHOR_AVATARS [ article . author ] ;
364+ const avatarUrl = Array . isArray ( article . author ) && article . author . length > 0 ? AUTHOR_AVATARS [ article . author [ 0 ] ] : undefined ;
365365
366366 return (
367367 < Link
@@ -410,11 +410,11 @@ function MostRecentFeaturedCard({ article }: { article: Article }) {
410410 { avatarUrl && (
411411 < img
412412 src = { avatarUrl }
413- alt = { article . author }
413+ alt = { Array . isArray ( article . author ) ? article . author . join ( ", " ) : article . author }
414414 className = "w-6 h-6 rounded-full object-cover"
415415 />
416416 ) }
417- < span > { article . author } </ span >
417+ < span > { Array . isArray ( article . author ) ? article . author . join ( ", " ) : article . author } </ span >
418418 < span > ·</ span >
419419 < time dateTime = { displayDate } >
420420 { new Date ( displayDate ) . toLocaleDateString ( "en-US" , {
@@ -441,7 +441,7 @@ function OtherFeaturedCard({
441441 const [ coverImageLoaded , setCoverImageLoaded ] = useState ( false ) ;
442442 const hasCoverImage = ! coverImageError ;
443443 const displayDate = article . date ;
444- const avatarUrl = AUTHOR_AVATARS [ article . author ] ;
444+ const avatarUrl = Array . isArray ( article . author ) && article . author . length > 0 ? AUTHOR_AVATARS [ article . author [ 0 ] ] : undefined ;
445445
446446 return (
447447 < Link
@@ -507,11 +507,11 @@ function OtherFeaturedCard({
507507 { avatarUrl && (
508508 < img
509509 src = { avatarUrl }
510- alt = { article . author }
510+ alt = { Array . isArray ( article . author ) ? article . author . join ( ", " ) : article . author }
511511 className = "w-5 h-5 rounded-full object-cover"
512512 />
513513 ) }
514- < span className = "truncate" > { article . author } </ span >
514+ < span className = "truncate" > { Array . isArray ( article . author ) ? article . author . join ( ", " ) : article . author } </ span >
515515 < span > ·</ span >
516516 < time dateTime = { displayDate } className = "shrink-0" >
517517 { new Date ( displayDate ) . toLocaleDateString ( "en-US" , {
@@ -528,7 +528,7 @@ function OtherFeaturedCard({
528528
529529function ArticleListItem ( { article } : { article : Article } ) {
530530 const displayDate = article . date ;
531- const avatarUrl = AUTHOR_AVATARS [ article . author ] ;
531+ const avatarUrl = Array . isArray ( article . author ) && article . author . length > 0 ? AUTHOR_AVATARS [ article . author [ 0 ] ] : undefined ;
532532
533533 return (
534534 < Link
@@ -551,12 +551,12 @@ function ArticleListItem({ article }: { article: Article }) {
551551 { avatarUrl && (
552552 < img
553553 src = { avatarUrl }
554- alt = { article . author }
554+ alt = { Array . isArray ( article . author ) ? article . author . join ( ", " ) : article . author }
555555 className = "w-5 h-5 rounded-full object-cover"
556556 />
557557 ) }
558558 < span className = "text-sm text-neutral-500 whitespace-nowrap" >
559- { article . author }
559+ { Array . isArray ( article . author ) ? article . author . join ( ", " ) : article . author }
560560 </ span >
561561 </ div >
562562 </ div >
@@ -570,7 +570,7 @@ function ArticleListItem({ article }: { article: Article }) {
570570 { avatarUrl && (
571571 < img
572572 src = { avatarUrl }
573- alt = { article . author }
573+ alt = { Array . isArray ( article . author ) ? article . author . join ( ", " ) : article . author }
574574 className = "w-5 h-5 rounded-full object-cover"
575575 />
576576 ) }
0 commit comments