Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit e1cfa59

Browse files
committed
feat(portal/schedule): add schedule components
1 parent 1c5bcca commit e1cfa59

File tree

4 files changed

+62
-6
lines changed

4 files changed

+62
-6
lines changed

apps/portal/app/routes/schedule.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { SchedulePage } from '@cuhacking/portal/pages/schedule'
55
export const loader: LoaderFunction = async () => {
66
try {
77
const API_URL = process.env.NODE_ENV === 'development' ? 'http://localhost:8000' : 'https://axiom.cuhacking.ca'
8-
const req = await fetch(`${API_URL}/api/challenges`)
8+
const req = await fetch(`${API_URL}/api/events`)
99

1010
if (!req.ok) {
1111
throw new Error('Error')

libs/portal/pages/challenges.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function ChallengesPage({ data }: { data: Data[] }) {
2222
return (
2323
<Layout isCompleteProfile={false}>
2424

25-
<section className="max-w-screen-xl mx-auto p-5 sm:px-10 py-40 pt-20">
25+
<section className="max-w-screen-xl mx-auto p-5 sm:px-10 py-40 pt-10">
2626
<GlassmorphicCard className="row-span-2 p-5 text-center mb-5">
2727
<Typography variant="h2">
2828
CHALLENGES

libs/portal/pages/qr.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Layout } from '@cuhacking/portal/ui/layout'
33
export function QrPage() {
44
return (
55
<Layout isCompleteProfile={false}>
6-
<section className="max-w-screen-xl mx-auto grid sm:grid-cols-2 gap-5 p-5 sm:px-10 py-40 pt-20">
6+
<section className="max-w-screen-xl mx-auto gap-5 p-5 sm:px-10 py-40 pt-20">
77
<div>
88
QR code page
99
</div>

libs/portal/pages/schedule.tsx

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,69 @@
11
import { Layout } from '@cuhacking/portal/ui/layout'
2+
import { Badge } from '@cuhacking/shared/ui/badge'
3+
import { Button } from '@cuhacking/shared/ui/button'
4+
import { Dialog, DialogContent, DialogTrigger } from '@cuhacking/shared/ui/dialog'
5+
import { GlassmorphicCard } from '@cuhacking/shared/ui/glassmorphic-card'
6+
import MultipleSelector from '@cuhacking/shared/ui/multi-select'
7+
import { Typography } from '@cuhacking/shared/ui/typography'
8+
9+
const options = [
10+
{ label: '🔊 Ceremony', value: 'ceremony' },
11+
{ label: '💻 Workshop', value: 'workshop' },
12+
{ label: '🥂 Networking', value: 'networking' },
13+
{ label: '🎉 Social', value: 'social' },
14+
{ label: '💡 Hackathon', value: 'hackathon' },
15+
{ label: '😂 Fun', value: 'fun' },
16+
{ label: '🥑 Food', value: 'food' },
17+
{ label: '🤹 Other', value: 'other' },
18+
]
219

320
export function SchedulePage() {
421
return (
522
<Layout isCompleteProfile={false}>
6-
<section className="max-w-screen-xl mx-auto grid sm:grid-cols-2 gap-5 p-5 sm:px-10 py-40 pt-20">
7-
<div>
8-
Schedule Page
23+
24+
<section className="max-w-screen-xl mx-auto p-5 sm:px-10 py-40 pt-10">
25+
<GlassmorphicCard className="row-span-2 p-5 text-center mb-5 ">
26+
<Typography variant="h2">
27+
SCHEDULE
28+
</Typography>
29+
</GlassmorphicCard>
30+
<div className="flex flex-col gap-5">
31+
32+
<div className="flex flex-row gap-3 justify-center ">
33+
<Button className="!hover:text-white cursor-pointer">Fri Mar 14th</Button>
34+
<Button className="cursor-pointer">Fri Mar 14th</Button>
35+
<Button className="cursor-pointer">Fri Mar 14th</Button>
36+
</div>
37+
<MultipleSelector isRequired={false} name="Filter" form={undefined} options={options} placeholder="filter" hidePlaceholderWhenSelected></MultipleSelector>
38+
<Event />
939
</div>
1040
</section>
1141
</Layout>
1242
)
1343
}
44+
45+
function Event() {
46+
return (
47+
<>
48+
<Dialog>
49+
<DialogTrigger asChild>
50+
<GlassmorphicCard className="p-4 flex flex-col sm:flex-row">
51+
<div className="flex-grow-1">
52+
<Typography variant="h5">Title</Typography>
53+
<Typography variant="paragraph-xs">⌛ 2:20pm - 5:30pm</Typography>
54+
<Typography variant="paragraph-xs">📍 RB 222</Typography>
55+
</div>
56+
<div className="flex-shrink-1">
57+
<Badge variant="outline">🚽 work</Badge>
58+
</div>
59+
</GlassmorphicCard>
60+
</DialogTrigger>
61+
62+
<DialogContent className="sm:max-w-[425px]">
63+
hi
64+
</DialogContent>
65+
</Dialog>
66+
67+
</>
68+
)
69+
}

0 commit comments

Comments
 (0)