-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsponsors.tsx
More file actions
49 lines (47 loc) · 1.58 KB
/
sponsors.tsx
File metadata and controls
49 lines (47 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { sponsors } from "@/lib/constants";
import Image from "next/image";
export default function Sponsors() {
const mostRecentYear = Math.max(
...sponsors.flatMap((sponsor) => sponsor.year.map(Number)),
).toString();
const latestSponsors = sponsors.filter((sponsor) =>
sponsor.year.includes(mostRecentYear),
);
return (
<div className="border-t py-12 lg:py-20 relative overflow-hidden">
<div className="max-w-2xl mx-auto pb-20">
<div className="grid gap-12">
<div>
<h2 className="text-3xl font-bold lg:text-4xl text-center">
Previous Sponsors
</h2>
</div>
</div>
</div>
<div className="max-w-6xl mx-auto grid sm:grid-cols-2 lg:grid-cols-4 items-center gap-12">
{latestSponsors.map((sponsor) => (
<div key={sponsor.title} className="text-center">
<div className="flex justify-center items-center w-24 h-24 mx-auto">
<a href={sponsor.url} target="_blank" rel="noreferrer">
<Image
src={sponsor.image}
alt={sponsor.title}
width={120}
height={120}
className="w-24 h-24 object-contain"
/>
</a>
</div>
<div className="mt-3">
<h3 className="text-lg font-semibold ">
<a href={sponsor.url} target="_blank" rel="noreferrer">
{sponsor.title}
</a>
</h3>
</div>
</div>
))}
</div>
</div>
);
}