1- 'use client' ;
1+ 'use client'
2+
23import * as React from "react"
34import { cn } from "@/lib/utils" ;
45import { Card } from "../ui/card" ;
@@ -7,8 +8,8 @@ import { ImageWithFallback } from "../utils/ImageWithFallback";
78import { useRouter } from "@/lib/i18n/navigation" ;
89import { Button } from "../ui/button" ;
910import { BadgeMedia } from "../Badge/BadgeMedia" ;
10- import { DateOnlyYearTooltip } from "../utils/Date" ;
1111import { WithLink } from "../utils/WithLink" ;
12+ import { getTmdbImage } from "@/lib/tmdb/getTmdbImage" ;
1213
1314interface CardPersonProps
1415 extends React . ComponentProps < typeof Card > {
@@ -38,16 +39,12 @@ const CardPersonDefault = React.forwardRef<
3839 className = { cn ( 'relative h-full shrink-0 overflow-hidden aspect-square rounded-full' , posterClassName ) }
3940 >
4041 < ImageWithFallback
41- src = { person . profile_url ?? '' }
42+ src = { getTmdbImage ( { path : person . profile_path , size : 'w342' } ) }
4243 alt = { person . name ?? '' }
4344 fill
4445 className = "object-cover"
4546 type = "person"
46- sizes = { `
47- (max-width: 640px) 96px,
48- (max-width: 1024px) 120px,
49- 150px
50- ` }
47+ unoptimized
5148 />
5249 </ div >
5350 < div className = 'px-2 py-1 space-y-1' >
@@ -76,16 +73,12 @@ const CardPersonRow = React.forwardRef<
7673 >
7774 < div className = { cn ( "relative w-24 aspect-2/3 rounded-md overflow-hidden" , posterClassName ) } >
7875 < ImageWithFallback
79- src = { person . profile_url ?? '' }
80- alt = { person . name ?? '' }
81- fill
82- className = "object-cover"
83- type = { 'person' }
84- sizes = { `
85- (max-width: 640px) 96px,
86- (max-width: 1024px) 120px,
87- 150px
88- ` }
76+ src = { getTmdbImage ( { path : person . profile_path , size : 'w342' } ) }
77+ alt = { person . name ?? '' }
78+ fill
79+ className = "object-cover"
80+ type = { 'person' }
81+ unoptimized
8982 />
9083 </ div >
9184 < div className = "flex items-center gap-4 justify-between w-full" >
0 commit comments