diff --git a/app/(landing)/hackathons/[slug]/page.tsx b/app/(landing)/hackathons/[slug]/page.tsx
index 43e983bb..1350ea7a 100644
--- a/app/(landing)/hackathons/[slug]/page.tsx
+++ b/app/(landing)/hackathons/[slug]/page.tsx
@@ -342,11 +342,9 @@ export default function HackathonPage() {
)}
{activeTab === 'resources' &&
- currentHackathon.resources?.length > 0 && ( // Direct array check
-
- )}
+ currentHackathon.resources?.length > 0 && }
{activeTab === 'participants' &&
- currentHackathon.participants?.length > 0 && ( // Direct array check
+ currentHackathon.participants?.length > 0 && (
)}
diff --git a/app/(landing)/organizations/[id]/hackathons/page.tsx b/app/(landing)/organizations/[id]/hackathons/page.tsx
index 8a324e41..1f0fb3e0 100644
--- a/app/(landing)/organizations/[id]/hackathons/page.tsx
+++ b/app/(landing)/organizations/[id]/hackathons/page.tsx
@@ -157,7 +157,7 @@ export default function HackathonsPage() {
? (item.data as HackathonDraft).data.information?.categories
?.join(',')
?.toLowerCase() || ''
- : ''; // Categories filtering only applies to drafts for now
+ : '';
return category.includes(categoryFilter.toLowerCase());
});
}
@@ -494,9 +494,11 @@ export default function HackathonsPage() {
);
}
+ const publishedHackathon = hackathon as Hackathon;
+
return (
@@ -506,15 +508,15 @@ export default function HackathonsPage() {
- {hackathon.status === 'PUBLISHED'
+ {publishedHackathon.status === 'PUBLISHED'
? 'Live'
- : hackathon.status}
+ : publishedHackathon.status}
{endDate && (
@@ -531,11 +533,19 @@ export default function HackathonsPage() {
- 0 participants
+
+ {publishedHackathon.participants?.length ||
+ publishedHackathon._count?.participants ||
+ 0}{' '}
+ participants
+
- 0 submissions
+
+ {publishedHackathon._count?.submissions || 0}{' '}
+ submissions
+
{totalPrize > 0 && (
<>
@@ -560,7 +570,7 @@ export default function HackathonsPage() {