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

Commit 187454f

Browse files
committed
feat(axiom/challenge): add challenge model + front end
1 parent 59990a1 commit 187454f

File tree

9 files changed

+345
-252
lines changed

9 files changed

+345
-252
lines changed

apps/axiom/src/components/Nav/navIconMap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const navIconMap: Partial<
2828
emails: Mail,
2929
organizerTeams: Signature,
3030
groups: PersonStanding,
31-
challengePrize: Trophy,
31+
challenges: Trophy,
3232
events: CalendarDays,
3333
forms: MousePointer2,
3434
"form-submissions": Inbox,
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// import type { LoaderFunction } from '@remix-run/node'
2+
// import process from 'node:process'
3+
import { ChallengesPage } from '@cuhacking/portal/pages/challenges'
4+
// import { useLoaderData } from '@remix-run/react'
5+
6+
// export const loader: LoaderFunction = async () => {
7+
// try {
8+
// const API_URL = process.env.NODE_ENV === 'development' ? 'http://localhost:8000' : 'https://axiom.cuhacking.ca'
9+
// const req = await fetch(`${API_URL}/api/challenges`)
10+
11+
// if (!req.ok) {
12+
// throw new Error('Error')
13+
// }
14+
15+
// // const { res } = await req.json()
16+
17+
// const data = { title: '', pathTitle: '', symbol: {}, challengeBlock: [] }
18+
19+
// //console.log(data)
20+
21+
// return {
22+
// title: data.title,
23+
// pathTitle: data.pathTitle,
24+
// symbol: data.symbol,
25+
// challengeBlock: data.challengeBlock
26+
// }
27+
// }
28+
// catch () {
29+
// console.error(`Error fetching challenges`)
30+
// return { title: '', pathTitle: '', symbol: {}, challengeBlock: [] }
31+
// }
32+
// }
33+
34+
export default function Challenges() {
35+
// const data = useLoaderData<typeof loader>()
36+
37+
return (
38+
<ChallengesPage />
39+
)
40+
}

libs/cms/configs/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ defaultDepth: 3,
4040
Hardware,
4141
Events,
4242
Hackathons,
43-
ChallengePrize,
43+
Challenges,
4444
],
4545
blocks:[
4646
// TeamBlock

libs/db/collections/models/Challenge.ts

Lines changed: 0 additions & 249 deletions
This file was deleted.

0 commit comments

Comments
 (0)