Skip to content

Commit

Permalink
SingleCourseContent route - Fix the regex for new-style course ids
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlandia committed May 31, 2021
1 parent 1cee763 commit f2c6449
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class App extends Component {
<Route exact path="/figures/learners-progress-overview" component={ProgressOverview} />
{(process.env.ENABLE_CSV_REPORTS === "enabled") && <Route exact path="/figures/csv-reports" component={CsvReports} />}
{/* course-v..-like course ids */}
<Route path="/figures/course/(?!(\/))" render={({ match }) => <SingleCourseContent courseId={match.params[0]} />}/>
<Route path={/(\/figures\/course\/)((?:(?!\/).)*$)/} render={({ match }) => <SingleCourseContent courseId={match.params[1]} />}/>
{/* old slash-separated course id style */}
<Route path="/figures/course/:courseOrg/:courseNum/:courseRun" render={({ match }) => <SingleCourseContent courseId={`${match.params.courseOrg}/${match.params.courseNum}/${match.params.courseRun}`} />}/>
<Route path="/figures/user/:userId" render={({ match }) => <SingleUserContent userId={match.params.userId} />}/>
Expand Down

0 comments on commit f2c6449

Please sign in to comment.