Skip to content

Commit ebf9d99

Browse files
fix: index goes to course info
1 parent 16f492f commit ebf9d99

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎src/data/apiHook.test.tsx‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ const mockCourseData = {
1111
courseNumber: '123',
1212
courseRun: '2024',
1313
enrollmentCounts: { total: 100, audit: 50 },
14-
enrollment_end: null,
1514
start: null,
1615
end: null,
1716
tabs: [],
18-
total_enrollment: 150,
19-
studio_url: 'http://studio.example.com',
17+
totalEnrollment: 150,
18+
studioUrl: 'http://studio.example.com',
2019
pacing: 'self-paced',
2120
org: 'Test Org',
2221
numSections: 10,

‎src/routes.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useParams } from 'react-router-dom';
1+
import { useParams, Navigate } from 'react-router-dom';
22
import CohortsPage from '@src/cohorts/CohortsPage';
33
import CourseInfoPage from '@src/courseInfo/CourseInfoPage';
44
import CertificatesPage from '@src/certificates/CertificatesPage';
@@ -60,7 +60,7 @@ const routes = [
6060
children: [
6161
{
6262
index: true,
63-
element: <PageNotFound />
63+
element: <Navigate to="course_info" replace />
6464
},
6565
{
6666
path: ':tabId',

0 commit comments

Comments
 (0)