Skip to content

Commit

Permalink
feat: upgrade react router to v6 (#359)
Browse files Browse the repository at this point in the history
* feat: upgrade react router to v6

* refactor: update test cases according to react router

* refactor: remove router from learning header

* chore: update peer deps
  • Loading branch information
Syed-Ali-Abbas-Zaidi authored Aug 16, 2023
1 parent 02bf46c commit 41807e9
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 63 deletions.
99 changes: 42 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@edx/brand": "npm:@edx/[email protected]",
"@edx/browserslist-config": "1.1.1",
"@edx/frontend-build": "12.9.4",
"@edx/frontend-platform": "4.6.1",
"@edx/frontend-platform": "5.0.0",
"@edx/reactifex": "2.2.0",
"@testing-library/dom": "9.3.1",
"@testing-library/jest-dom": "5.17.0",
Expand All @@ -50,14 +50,14 @@
"react": "17.0.2",
"react-dom": "17.0.2",
"react-redux": "7.2.9",
"react-router-dom": "5.3.4",
"react-router-dom": "6.15.0",
"react-test-renderer": "17.0.2",
"reactifex": "1.1.1",
"redux": "4.2.1",
"redux-saga": "1.2.3"
},
"dependencies": {
"@edx/frontend-enterprise-utils": "3.4.0",
"@edx/frontend-enterprise-utils": "4.0.0",
"@edx/paragon": "20.45.5",
"@fortawesome/fontawesome-svg-core": "6.4.2",
"@fortawesome/free-brands-svg-icons": "6.4.2",
Expand All @@ -78,7 +78,7 @@
"timeago.js": "4.0.2"
},
"peerDependencies": {
"@edx/frontend-platform": "^4.0.0",
"@edx/frontend-platform": "^4.0.0 || ^5.0.0",
"prop-types": "^15.5.10",
"react": "^16.9.0 || ^17.0.0",
"react-dom": "^16.9.0 || ^17.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/Notifications/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function renderComponent(location = '/') {
render(
<ResponsiveContext.Provider>
<IntlProvider locale="en" messages={{}}>
<AppProvider store={store}>
<AppProvider store={store} wrapWithRouter={false}>
<AppContext.Provider>
<MemoryRouter initialEntries={[location]}>
<AuthenticatedUserDropdown />
Expand Down
2 changes: 1 addition & 1 deletion src/learning-header/LearningHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const LearningHeader = ({
}

return (
<AppProvider store={store}>
<AppProvider store={store} wrapWithRouter={false}>
<header className="learning-header">
<a className="sr-only sr-only-focusable" href="#main-content">{intl.formatMessage(messages.skipNavLink)}</a>
<div className="px-4 py-2.5 d-flex align-items-center learning-header-container">
Expand Down

0 comments on commit 41807e9

Please sign in to comment.