Skip to content

Commit

Permalink
feat(ui/portal): add dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
HasithDeAlwis committed Feb 12, 2025
1 parent 86a7cdb commit 436a2ef
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions libs/portal/pages/index/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,47 @@ import { Banner } from '@cuhacking/portal/ui/dashboard/banner'
import { HackathonCountdown } from '@cuhacking/portal/ui/dashboard/hackathon-countdown'
import { Stat } from '@cuhacking/portal/ui/dashboard/stat'
import { UserStatus } from '@cuhacking/portal/ui/dashboard/user-status'
import { Sidebar } from '@cuhacking/portal/ui/sidebar'
import { Button } from '@cuhacking/shared/ui/button'

const constants = {
user: {
name: 'Hasith',
name: 'Saim',
},
hackathonDate: new Date(2025, 3, 14),
hackathonDate: new Date(2025, 2, 14),
status: 'pending',
stats: [
{
label: 'Total Applications',
value: 1000,
},
{
label: 'Money Raised', // Fixed key from 'name' to 'label'
label: 'Money Raised',
value: '$12,230',
},
],
}

export function Index() {
export function Home() {
return (
<div className="flex flex-col gap-5 relative w-full max-w-screen-xl mx-auto">
<Banner name={constants.user.name} />
<HackathonCountdown date={constants.hackathonDate} />
{constants.stats.map((stat, index) => (
<Stat key={index} label={stat.label} value={stat.value} />
))}
<UserStatus name={constants.user.name} status={constants.status} />

<div className="flex h-screen">
<Sidebar />
<div className="flex flex-1 flex-col w-full p-4 gap-5">
<Banner name={constants.user.name} />
<div className="flex justify-center w-full">
<Button
className="text-black px-8 md:px-12 py-2.5"
variant="secondary"
>
APPLY TO CUHACKING 6
</Button>
</div>
<HackathonCountdown date={constants.hackathonDate} />
{constants.stats.map(stat => (
<Stat key={stat.label} label={stat.label} value={stat.value} />
))}
<UserStatus name={constants.user.name} status={constants.status} />
</div>
</div>
)
}

0 comments on commit 436a2ef

Please sign in to comment.