-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade react router to v6 (#1128)
* feat: upgrade react router to v6 * fix: all test cases affected by react router upgrade * refactor: fix navigations * fix: test cases affectewd due to lib-special-exams * refactor: improve code coverage
- Loading branch information
1 parent
b7a3d56
commit b788b96
Showing
46 changed files
with
952 additions
and
734 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -30,11 +30,11 @@ | |
}, | ||
"dependencies": { | ||
"@edx/brand": "npm:@edx/[email protected]", | ||
"@edx/frontend-component-footer": "12.1.2", | ||
"@edx/frontend-component-header": "4.4.4", | ||
"@edx/frontend-component-footer": "12.2.1", | ||
"@edx/frontend-component-header": "4.6.0", | ||
"@edx/frontend-lib-learning-assistant": "^1.14.0", | ||
"@edx/frontend-lib-special-exams": "2.23.2", | ||
"@edx/frontend-platform": "4.6.0", | ||
"@edx/frontend-platform": "5.0.0", | ||
"@edx/paragon": "20.46.0", | ||
"@edx/react-unit-test-utils": "npm:@edx/[email protected]", | ||
"@fortawesome/fontawesome-svg-core": "1.3.0", | ||
|
@@ -55,8 +55,8 @@ | |
"react-dom": "17.0.2", | ||
"react-helmet": "6.1.0", | ||
"react-redux": "7.2.9", | ||
"react-router": "5.2.1", | ||
"react-router-dom": "5.3.0", | ||
"react-router": "6.15.0", | ||
"react-router-dom": "6.15.0", | ||
"react-share": "4.4.1", | ||
"redux": "4.1.2", | ||
"regenerator-runtime": "0.13.11", | ||
|
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,33 @@ | ||
export const DECODE_ROUTES = { | ||
ACCESS_DENIED: '/course/:courseId/access-denied', | ||
HOME: '/course/:courseId/home', | ||
LIVE: '/course/:courseId/live', | ||
DATES: '/course/:courseId/dates', | ||
DISCUSSION: '/course/:courseId/discussion/:path/*', | ||
PROGRESS: [ | ||
'/course/:courseId/progress/:targetUserId/', | ||
'/course/:courseId/progress', | ||
], | ||
COURSE_END: '/course/:courseId/course-end', | ||
COURSEWARE: [ | ||
'/course/:courseId/:sequenceId/:unitId', | ||
'/course/:courseId/:sequenceId', | ||
'/course/:courseId', | ||
], | ||
REDIRECT_HOME: 'home/:courseId', | ||
REDIRECT_SURVEY: 'survey/:courseId', | ||
}; | ||
|
||
export const ROUTES = { | ||
UNSUBSCRIBE: '/goal-unsubscribe/:token', | ||
REDIRECT: '/redirect/*', | ||
DASHBOARD: 'dashboard', | ||
CONSENT: 'consent', | ||
}; | ||
|
||
export const REDIRECT_MODES = { | ||
DASHBOARD_REDIRECT: 'dashboard-redirect', | ||
CONSENT_REDIRECT: 'consent-redirect', | ||
HOME_REDIRECT: 'home-redirect', | ||
SURVEY_REDIRECT: 'survey-redirect', | ||
}; |
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
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
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
Oops, something went wrong.