react: fix incorrect use of keys

Signed-off-by: Paul W. <lambdapaul@protonmail.com>
This commit is contained in:
2024-12-06 13:52:40 -05:00
parent 706100ccce
commit 619d2771cc
7 changed files with 80 additions and 80 deletions
+17 -17
View File
@@ -2,23 +2,23 @@ import Link from 'next/link';
import Pages from '../public/external.json';
function QuickLinks() {
return (
<div className='block'>
{
Object.entries(Pages).map(([title, link], i) => {
const extern = link.match(/^http/) && `blue extern` || '';
return (
<Link
key={i}
href={link}
className={`${extern} link button`}>
{title}
</Link>
);
})
}
</div>
);
return (
<div className='block'>
{
Object.entries(Pages).map(([title, link]) => {
const extern = link.match(/^http/) && `blue extern` || '';
return (
<Link
key={link}
href={link}
className={`${extern} link button`}>
{title}
</Link>
);
})
}
</div>
);
}
export default QuickLinks;