fix no key on mapped react elements

This commit is contained in:
2026-03-07 12:21:46 -06:00
parent 1a5b5a336f
commit 1507fdb9eb
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ export function Stars() {
return positions; return positions;
}, []); }, []);
return positions.map(coord => <mesh position={coord}> return positions.map((coord, i) => <mesh key={i} position={coord}>
<sphereGeometry args={[.1]} /> <sphereGeometry args={[.1]} />
<meshBasicMaterial /> <meshBasicMaterial />
</mesh> </mesh>

View File

@@ -21,7 +21,7 @@ export function Menu({active} : {active: boolean}) {
return ( return (
<motion.section initial={{left: hidden}} className="menu"> <motion.section initial={{left: hidden}} className="menu">
{ {
articles.map(title => <div> articles.map(title => <div key={title}>
{title} {title}
</div>) </div>)
} }