fixed missing key on trending page

nextui
Guus van Meerveld 8 months ago
parent 2e8785bf23
commit ca9cdcea7a

@ -42,7 +42,7 @@ export const Trending: Component = ({}) => {
{data && ( {data && (
<div className="grid gap-4 py-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3"> <div className="grid gap-4 py-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
{data.map((video) => ( {data.map((video) => (
<VideoCard data={video} /> <VideoCard key={video.id} data={video} />
))} ))}
</div> </div>
)} )}

@ -10,7 +10,7 @@ export const VideoCard: Component<{ data: TrendingVideo }> = ({
data: video data: video
}) => { }) => {
return ( return (
<Link key={video.id} href={`/watch?v=${video.id}`}> <Link href={`/watch?v=${video.id}`}>
<Card radius="lg"> <Card radius="lg">
<CardBody> <CardBody>
<Image <Image

Loading…
Cancel
Save