fix: search result key duplicate

This commit is contained in:
shinya
2025-06-26 12:44:45 +08:00
parent 1100a31a7d
commit 1668d4e40f
2 changed files with 6 additions and 3 deletions

View File

@@ -176,7 +176,7 @@ function SearchPageClient() {
group[0].year || 'unknown' group[0].year || 'unknown'
}`; }`;
return ( return (
<div key={key} className='w-full'> <div key={`agg-${key}`} className='w-full'>
<AggregateCard <AggregateCard
items={group} items={group}
query={searchQuery} query={searchQuery}
@@ -186,7 +186,10 @@ function SearchPageClient() {
); );
}) })
: searchResults.map((item) => ( : searchResults.map((item) => (
<div key={item.id} className='w-full'> <div
key={`all-${item.source}-${item.id}`}
className='w-full'
>
<VideoCard <VideoCard
id={item.id} id={item.id}
title={item.title} title={item.title}

View File

@@ -90,7 +90,7 @@ const MobileBottomNav = ({ activePath }: MobileBottomNavProps) => {
{navItems.map((item) => { {navItems.map((item) => {
const active = isActive(item.href); const active = isActive(item.href);
return ( return (
<li key={item.href} className='flex-shrink-0 w-1/4'> <li key={item.href} className='flex-shrink-0 w-1/5'>
<Link <Link
href={item.href} href={item.href}
className='flex flex-col items-center justify-center w-full h-14 gap-1 text-xs' className='flex flex-col items-center justify-center w-full h-14 gap-1 text-xs'