Add page route and redirect to handle old urls

This commit is contained in:
Kristin Aoki
2021-08-12 09:50:06 -04:00
parent 7b57b06ed5
commit 38db0ebfe1
2 changed files with 7 additions and 0 deletions

View File

@@ -25,6 +25,12 @@ export default () => {
path={`${path}/courseware/:courseId/unit/:unitId`}
component={CoursewareRedirect}
/>
<PageRoute
path={`${path}/:courseId/:sequenceId/:unitId`}
render={({ match }) => {
global.location.assign(`/c/${match.params.courseId}/${match.params.sequenceId}/${match.params.unitId}`)
}}
/>
<PageRoute
path={`${path}/course-home/:courseId`}
render={({ match }) => {

View File

@@ -34,6 +34,7 @@ subscribe(APP_READY, () => {
<UserMessagesProvider>
<Switch>
<PageRoute path="/redirect" component={CoursewareRedirectLandingPage} />
<PageRoute path="/course" component={CoursewareRedirectLandingPage} />
<PageRoute path="/c/:courseId/home">
<TabContainer tab="outline" fetch={fetchOutlineTab} slice="courseHome">
<OutlineTab />