make the computer/people icon numbers not hard coded

This commit is contained in:
Jiajun Xu 2025-05-22 21:01:57 -07:00
parent 449f1abd4d
commit ed1c796f49

View File

@ -41,35 +41,18 @@ export default function Navbar({ activePage = "" }: NavbarProps) {
</div>
<div className={cn("flex flex-row justify-between pb-8")}>
{[
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
].map(() => (
<>
<a
href="https://www.flaticon.com/free-icons/computer"
title="computer icons"
>
<img
src="/assets/computer.png"
alt="computer icon"
width="30"
height="30"
<div className="w-full grid grid-flow-col auto-cols-[76px] gap-8">
{Array.from({ length: 20 }).map((_, index) => (
<div key={index} className="flex justify-center">
<img
src={index % 2 === 0 ? "/assets/computer.png" : "/assets/people.png"}
alt={index % 2 === 0 ? "computer icon" : "people icon"}
width="30"
height="30"
/>
</a>
<a
href="https://www.flaticon.com/free-icons/peopler"
title="people icons"
>
<img
src="/assets/people.png"
alt="people icon"
width="30"
height="30"
/>
</a>
</>
))}
</div>
))}
</div>
</div>
</>
);