-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
106 additions
and
7 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
frontend/src/app/courses/[courseCode]/course-profile/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { useMemo } from 'react'; | ||
import { Course } from '@/types'; | ||
|
||
export default function CourseProfile({ params }: { params: { courseCode: string }}) { | ||
const course: Course = useMemo(() => { | ||
// query backend here | ||
return { | ||
coursecode: params.courseCode.toUpperCase(), | ||
coursename: 'Course Name', | ||
coursedescription: 'Some sort of description' | ||
} | ||
}, [params.courseCode]) | ||
|
||
return ( | ||
<main> | ||
<h1>{course.coursename}</h1> | ||
<h2>{course.coursecode}</h2> | ||
<h2>{course.coursedescription}</h2> | ||
</main> | ||
); | ||
} |
21 changes: 21 additions & 0 deletions
21
frontend/src/app/courses/[courseCode]/exams/[examId]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { useMemo } from 'react'; | ||
|
||
export default function Exam({ params }: { params: { courseCode: string, examId: number }}) { | ||
const exam = useMemo(() => { | ||
// query backend here | ||
return { | ||
examid: params.examId, | ||
examyear: 2023, | ||
examsemester: 1, | ||
examtype: 'Final' | ||
} | ||
}, [params.examId]) | ||
|
||
return ( | ||
<main> | ||
<h1>{`${params.courseCode} ${exam.examtype}`}</h1> | ||
<h2>{`${exam.examyear} Semester ${exam.examsemester}`}</h2> | ||
There will be some questions here | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useMemo } from 'react'; | ||
import { Course } from '@/types'; | ||
|
||
export default function Exams({ params }: { params: { courseCode: string }}) { | ||
const course: Course = useMemo(() => { | ||
// query backend here | ||
return { | ||
coursecode: params.courseCode.toUpperCase(), | ||
coursename: 'Course Name', | ||
coursedescription: 'Some sort of description' | ||
} | ||
}, [params.courseCode]) | ||
|
||
return ( | ||
<main> | ||
<h1>Exams for {course.coursecode}</h1> | ||
There will be some cards here | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useMemo } from 'react'; | ||
import { Course } from '@/types'; | ||
|
||
export default function Notes({ params }: { params: { courseCode: string }}) { | ||
const course: Course = useMemo(() => { | ||
// query backend here | ||
return { | ||
coursecode: params.courseCode.toUpperCase(), | ||
coursename: 'Course Name', | ||
coursedescription: 'Some sort of description' | ||
} | ||
}, [params.courseCode]) | ||
|
||
return ( | ||
<main> | ||
<h1>Study material for {course.coursecode}</h1> | ||
There will be some cards here | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export type Course = { | ||
coursecode: string | ||
coursename: string | ||
coursedescription: string | ||
} |