Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f4dcdc0
fix: modify api.ts
Benjtalkshow Oct 14, 2025
b90d4ed
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Oct 16, 2025
9ea81a5
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Oct 16, 2025
5be269f
fix: remove google auth buttom
Benjtalkshow Oct 16, 2025
490dcb2
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Oct 20, 2025
842fd48
fix: fixes responsive fixes on organization
Benjtalkshow Oct 20, 2025
596a7f8
fix: minor fixes
Benjtalkshow Nov 6, 2025
96fee24
fix: minor fixes
Benjtalkshow Nov 6, 2025
9dfb149
fix: modify create organization
Benjtalkshow Nov 7, 2025
a194d90
fix: modify create organization
Benjtalkshow Nov 7, 2025
b2ceee0
fix: fix organization permission
Benjtalkshow Nov 8, 2025
9ea97d1
fix: merge into main
Benjtalkshow Nov 8, 2025
adb4629
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Nov 8, 2025
0c11420
fix: merge into main
Benjtalkshow Nov 8, 2025
1f5ec24
feat: hackathon overview page
Benjtalkshow Nov 11, 2025
bca1ef6
feat: hackathon overview page
Benjtalkshow Nov 11, 2025
9202b4f
feat: implement participant overview
Benjtalkshow Nov 12, 2025
096f265
feat: implement participant overview
Benjtalkshow Nov 12, 2025
b3478d0
feat: implement resources tab
Benjtalkshow Nov 12, 2025
e83a0be
feat: implement the submission tab
Benjtalkshow Nov 12, 2025
398be9b
feat: implement comment tab
Benjtalkshow Nov 12, 2025
de546b1
fix: implement provider for hackathon
Benjtalkshow Nov 14, 2025
0fd2690
fix: implement provider for hackathon
Benjtalkshow Nov 14, 2025
0d7417f
fix: minor fixes
Benjtalkshow Nov 15, 2025
4d3efee
fix: merge branch 'main' of https://github.com/Benjtalkshow/boundless…
Benjtalkshow Nov 15, 2025
83893e4
fix: hackathon banner
Benjtalkshow Nov 15, 2025
8013d62
fix: hackathon banner
Benjtalkshow Nov 15, 2025
3fb1323
fix: fix hackthon conflict
Benjtalkshow Nov 15, 2025
b7fc94f
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Nov 15, 2025
0594ac8
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Nov 15, 2025
7e08bc1
fix: fix organization page
Benjtalkshow Nov 15, 2025
22c12c1
fix: fix organization page
Benjtalkshow Nov 16, 2025
08e5be5
fix: fix organization page
Benjtalkshow Nov 16, 2025
8e6bded
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Nov 16, 2025
5e6c9e6
fix: use transform
Benjtalkshow Nov 17, 2025
9135f2e
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Nov 17, 2025
c2409f4
fix: add tagline
Benjtalkshow Nov 18, 2025
b08579a
fix: add tagline
Benjtalkshow Nov 18, 2025
4b8ef58
fix: fix conflict
Benjtalkshow Nov 18, 2025
0ee756e
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Nov 19, 2025
ab0384d
fix: minor fixes
Benjtalkshow Nov 20, 2025
91b5c18
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Nov 20, 2025
67c9fee
fix: minor fixes
Benjtalkshow Nov 21, 2025
9b2029b
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Nov 21, 2025
1fca425
fix: fix timeline and prizes
Benjtalkshow Nov 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions app/(landing)/hackathons/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import { HackathonDiscussions } from '@/components/hackathons/discussion/comment';
import { TeamFormationTab } from '@/components/hackathons/team-formation/TeamFormationTab';
import LoadingScreen from '@/components/landing-page/project/CreateProjectModal/LoadingScreen';
import { useTimelineEvents } from '@/hooks/hackathon/use-timeline-events';

export default function HackathonPage() {
const router = useRouter();
Expand All @@ -23,14 +24,16 @@

const {
currentHackathon,
// content,
timelineEvents,
participants,
submissions,
prizes,
loading,
setCurrentHackathon,
} = useHackathonData();
console.log(currentHackathon);

Check warning on line 32 in app/(landing)/hackathons/[slug]/page.tsx

View workflow job for this annotation

GitHub Actions / Code Quality & Linting

Unexpected console statement
const timeline_Events = useTimelineEvents(currentHackathon, {
includeEndDate: false,
dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },
});

const hackathonTabs = useMemo(() => {
const tabs = [
Expand Down Expand Up @@ -193,8 +196,9 @@
{activeTab === 'overview' && (
<HackathonOverview
content={currentHackathon.description}
timelineEvents={timelineEvents}
prizes={prizes}
timelineEvents={timeline_Events}
prizes={currentHackathon.prizeTiers}
totalPrizePool={currentHackathon.totalPrizePool}
hackathonSlugOrId={hackathonId}
/>
)}
Expand Down
33 changes: 17 additions & 16 deletions app/(landing)/hackathons/preview/[orgId]/[draftId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useRouter, useSearchParams } from 'next/navigation';
import { ArrowLeft } from 'lucide-react';
import {
previewDraft,
PrizeTier,
transformPublicHackathonToHackathon,
} from '@/lib/api/hackathons';
import { HackathonBanner } from '@/components/hackathons/hackathonBanner';
Expand All @@ -28,30 +29,29 @@ const mockTimelineEvents = [
{ event: 'Winners Announced', date: new Date().toISOString() },
];

const mockPrizes = [
const mockPrizes: PrizeTier[] = [
{
title: 'First Place',
rank: '1st',
prize: '$5,000',
icon: '🥇',
details: ['Cash prize', 'Certificate', 'Featured on homepage'],
position: '1st',
amount: 5000,
currency: 'USD',
description: 'Cash prize, Certificate, Featured on homepage',
},
{
title: 'Second Place',
rank: '2nd',
prize: '$3,000',
icon: '🥈',
details: ['Cash prize', 'Certificate'],
position: '2nd',
amount: 3000,
currency: 'USD',
description: 'Cash prize, Certificate',
},
{
title: 'Third Place',
rank: '3rd',
prize: '$2,000',
icon: '🥉',
details: ['Cash prize', 'Certificate'],
position: '3rd',
amount: 2000,
currency: 'USD',
description: 'Cash prize, Certificate',
},
];

const totalPrizePool = mockPrizes.reduce((sum, prize) => sum + prize.amount, 0);

interface PreviewPageProps {
params: Promise<{
orgId: string;
Expand Down Expand Up @@ -400,6 +400,7 @@ export default function DraftPreviewPage({ params }: PreviewPageProps) {
<div className='mx-auto max-w-7xl px-6 py-12 text-white'>
{activeTab === 'overview' && (
<HackathonOverview
totalPrizePool={totalPrizePool.toString()}
content={mockContent}
timelineEvents={mockTimelineEvents}
prizes={mockPrizes}
Expand Down
22 changes: 9 additions & 13 deletions components/hackathons/overview/hackathonOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,17 @@
import { useMarkdown } from '@/hooks/use-markdown';
import { HackathonTimeline } from './hackathonTimeline';
import { HackathonPrizes } from './hackathonPrizes';
import { PrizeTier } from '@/lib/api/hackathons';

interface TimelineEvent {
interface Timeline {
event: string;
date: string;
}

interface Prize {
title: string;
rank: string;
prize: string;
details: string[];
icon?: string;
}

interface HackathonOverviewProps {
content: string;
timelineEvents?: TimelineEvent[];
prizes?: Prize[];
timelineEvents?: Timeline[];
prizes?: PrizeTier[];
totalPrizePool: string;
className?: string;
hackathonSlugOrId?: string;
organizationId?: string;
Expand All @@ -30,6 +23,7 @@ export function HackathonOverview({
timelineEvents,
prizes,
className = '',
totalPrizePool,
}: HackathonOverviewProps) {
// Use the markdown hook to parse and style the content
const { styledContent, loading, error } = useMarkdown(content, {
Expand All @@ -50,7 +44,9 @@ export function HackathonOverview({
</article>

{timelineEvents && <HackathonTimeline events={timelineEvents} />}
{prizes && <HackathonPrizes prizes={prizes} />}
{prizes && (
<HackathonPrizes totalPrizePool={totalPrizePool} prizes={prizes} />
)}
</div>
);
}
114 changes: 79 additions & 35 deletions components/hackathons/overview/hackathonPrizes.tsx
Original file line number Diff line number Diff line change
@@ -1,66 +1,110 @@
'use client';

import { PrizeTier } from '@/lib/api/hackathons';

interface HackathonPrizesProps {
title?: string;
totalPrizes?: string;
totalPrizePool?: string;
otherPrizes?: string;
prizes: Array<{
title: string;
rank: string;
prize: string;
details: string[];
icon?: string;
}>;
prizes: PrizeTier[];
}

export function HackathonPrizes({
title = 'PRIZES',
totalPrizes = '$1,000+ in prizes',
totalPrizePool,
otherPrizes,
prizes,
}: HackathonPrizesProps) {
const firstThreePrizes = prizes.slice(0, 3);
const remainingPrizes = prizes.slice(3);

return (
<div className='space-y-6 py-8'>
<div>
<h2 className='text-primary mb-4 text-2xl font-bold'>{title}</h2>
<div className='flex items-center justify-between rounded-lg border border-white/10 bg-white/5 p-4'>
<span className='text-sm text-white/90'>{totalPrizes}</span>
<span className='text-sm text-white/90'>{totalPrizePool} USDC</span>
{otherPrizes && (
<span className='text-xs text-[#a7f950]'>+ {otherPrizes}</span>
)}
</div>
</div>

<div className='grid grid-cols-1 gap-4 md:grid-cols-2'>
{prizes.map((prize, index) => (
<div
key={index}
className='rounded-lg border border-[#a7f950]/30 bg-gradient-to-br from-[#a7f950]/10 to-transparent p-6 transition-colors hover:border-[#a7f950]/50'
>
<div className='mb-4 flex items-start gap-3'>
<span className='text-2xl'>{prize.icon || '⭐'}</span>
<div>
<h3 className='text-lg font-bold text-white'>{prize.title}</h3>
<p className='text-xs text-white/60'>{prize.rank}</p>
{/* First 3 prizes in cards */}
{firstThreePrizes.length > 0 && (
<div className='grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3'>
{firstThreePrizes.map((prize, index) => (
<div
key={index}
className='rounded-lg border border-[#a7f950]/30 bg-gradient-to-br from-[#a7f950]/10 to-transparent p-6 transition-colors hover:border-[#a7f950]/50'
>
<div className='mb-4 flex items-start gap-3'>
<span className='text-2xl'>
{index === 0
? '🥇'
: index === 1
? '🥈'
: index === 2
? '🥉'
: '⭐'}
</span>
<div>
<h3 className='text-lg font-bold text-white'>
{prize.position}
</h3>
<p className='text-xs text-white/60'>{prize.position}</p>
</div>
</div>
</div>

<div className='space-y-3'>
<div className='text-base font-bold text-[#a7f950]'>
{prize.prize}
<div className='space-y-3'>
<div className='text-base font-bold text-[#a7f950]'>
{prize.amount} {prize.currency || 'USDC'}
</div>
</div>
<ul className='space-y-2'>
{prize.details.map((detail, i) => (
<li key={i} className='flex gap-2 text-sm text-white/70'>
<span className='flex-shrink-0 text-[#a7f950]'>✓</span>
<span>{detail}</span>
</li>
))}
</ul>
</div>
))}
</div>
)}

{remainingPrizes.length > 0 && (
<div className='w-full pt-8'>
<div className='overflow-x-auto'>
<table className='w-full'>
<thead>
<tr className='border-b border-white/10'>
<th className='text-primary px-4 py-3 text-left text-sm font-bold'>
POSITION
</th>
<th className='text-primary px-4 py-3 text-left text-sm font-bold'>
PRIZE AMOUNT
</th>
<th className='text-primary px-4 py-3 text-left text-sm font-bold'>
CURRENCY
</th>
</tr>
</thead>
<tbody>
{remainingPrizes.map((prize, index) => (
<tr
key={index}
className='border-b border-white/10 transition-colors hover:bg-white/5'
>
<td className='px-4 py-4 text-left text-sm text-white'>
{prize.position}
</td>
<td className='px-4 py-4 text-left text-sm text-white/70'>
{prize.amount}
</td>
<td className='px-4 py-4 text-left text-sm text-white/70'>
{prize.currency || 'USDC'}
</td>
</tr>
))}
</tbody>
</table>
</div>
))}
</div>
</div>
)}
</div>
);
}
Loading
Loading