Commit
·
37b153e
1
Parent(s):
4b9d358
rm numbers
Browse files- src/pages/index.tsx +2 -17
src/pages/index.tsx
CHANGED
@@ -59,22 +59,13 @@ export async function getStaticProps() {
|
|
59 |
}
|
60 |
}
|
61 |
|
62 |
-
const ProviderHeatmap = React.memo(({ provider, calendarData
|
63 |
const providerName = provider.fullName || provider.authors[0];
|
64 |
const calendarKey = provider.authors[0]; // Use the same key as calendar generation
|
65 |
const totalCount = calendarData[calendarKey]?.reduce((sum, day) => sum + day.count, 0) || 0;
|
66 |
-
|
67 |
-
const rankingBadge = getRankingBadge(rank);
|
68 |
|
69 |
return (
|
70 |
-
<div id={`provider-${calendarKey}`} className=
|
71 |
-
{/* Ranking Badge */}
|
72 |
-
<div className={rankingBadge.className}>
|
73 |
-
<span className="flex items-center justify-center">
|
74 |
-
{rankingBadge.icon || rank}
|
75 |
-
</span>
|
76 |
-
</div>
|
77 |
-
|
78 |
{/* Organization Header */}
|
79 |
<OrganizationCard
|
80 |
provider={provider}
|
@@ -156,7 +147,6 @@ const OpenSourceHeatmap: React.FC<OpenSourceHeatmapProps> = ({
|
|
156 |
</div>
|
157 |
) : (
|
158 |
<>
|
159 |
-
{/* Top 3 Podium */}
|
160 |
<div className="mb-16">
|
161 |
<div className="flex flex-col gap-8 max-w-4xl mx-auto">
|
162 |
{sortedProviders.slice(0, 3).map((provider, index) => (
|
@@ -164,7 +154,6 @@ const OpenSourceHeatmap: React.FC<OpenSourceHeatmapProps> = ({
|
|
164 |
key={provider.fullName || provider.authors[0]}
|
165 |
provider={provider}
|
166 |
calendarData={calendarData}
|
167 |
-
rank={index + 1}
|
168 |
/>
|
169 |
))}
|
170 |
</div>
|
@@ -172,19 +161,15 @@ const OpenSourceHeatmap: React.FC<OpenSourceHeatmapProps> = ({
|
|
172 |
|
173 |
{/* Rest of the providers */}
|
174 |
{sortedProviders.length > 3 && (
|
175 |
-
<div>
|
176 |
-
<h2 className="text-xl font-semibold text-center mb-8 text-muted-foreground">All Organizations</h2>
|
177 |
<div className="flex flex-col gap-8 max-w-4xl mx-auto">
|
178 |
{sortedProviders.slice(3).map((provider, index) => (
|
179 |
<ProviderHeatmap
|
180 |
key={provider.fullName || provider.authors[0]}
|
181 |
provider={provider}
|
182 |
calendarData={calendarData}
|
183 |
-
rank={index + 4}
|
184 |
/>
|
185 |
))}
|
186 |
</div>
|
187 |
-
</div>
|
188 |
)}
|
189 |
</>
|
190 |
)}
|
|
|
59 |
}
|
60 |
}
|
61 |
|
62 |
+
const ProviderHeatmap = React.memo(({ provider, calendarData }: { provider: ProviderInfo, calendarData: CalendarData }) => {
|
63 |
const providerName = provider.fullName || provider.authors[0];
|
64 |
const calendarKey = provider.authors[0]; // Use the same key as calendar generation
|
65 |
const totalCount = calendarData[calendarKey]?.reduce((sum, day) => sum + day.count, 0) || 0;
|
|
|
|
|
66 |
|
67 |
return (
|
68 |
+
<div id={`provider-${calendarKey}`} className="relative bg-gradient-to-br from-card to-card/95 rounded-2xl border border-border shadow-lg hover:shadow-xl transition-all duration-300 p-6 group">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
{/* Organization Header */}
|
70 |
<OrganizationCard
|
71 |
provider={provider}
|
|
|
147 |
</div>
|
148 |
) : (
|
149 |
<>
|
|
|
150 |
<div className="mb-16">
|
151 |
<div className="flex flex-col gap-8 max-w-4xl mx-auto">
|
152 |
{sortedProviders.slice(0, 3).map((provider, index) => (
|
|
|
154 |
key={provider.fullName || provider.authors[0]}
|
155 |
provider={provider}
|
156 |
calendarData={calendarData}
|
|
|
157 |
/>
|
158 |
))}
|
159 |
</div>
|
|
|
161 |
|
162 |
{/* Rest of the providers */}
|
163 |
{sortedProviders.length > 3 && (
|
|
|
|
|
164 |
<div className="flex flex-col gap-8 max-w-4xl mx-auto">
|
165 |
{sortedProviders.slice(3).map((provider, index) => (
|
166 |
<ProviderHeatmap
|
167 |
key={provider.fullName || provider.authors[0]}
|
168 |
provider={provider}
|
169 |
calendarData={calendarData}
|
|
|
170 |
/>
|
171 |
))}
|
172 |
</div>
|
|
|
173 |
)}
|
174 |
</>
|
175 |
)}
|