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

View File

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