Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade react router to v6 #776

Merged
merged 8 commits into from
Oct 10, 2023
Merged

Conversation

Syed-Ali-Abbas-Zaidi
Copy link
Contributor

@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi commented Jun 22, 2023

Ticket

React Router Upgrade to v6.

Description

This PR upgrades React Router from v5 to v6.

@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi self-assigned this Jun 22, 2023
…al-enterprise into Ali-Abbas/react-router-upgrade
@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi marked this pull request as draft June 22, 2023 04:40
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Attention: 80 lines in your changes are missing coverage. Please review.

Comparison is base (d36b78a) 84.87% compared to head (b629118) 85.00%.
Report is 68 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #776      +/-   ##
==========================================
+ Coverage   84.87%   85.00%   +0.13%     
==========================================
  Files         320      324       +4     
  Lines        6399     6704     +305     
  Branches     1552     1626      +74     
==========================================
+ Hits         5431     5699     +268     
- Misses        941      974      +33     
- Partials       27       31       +4     
Files Coverage Δ
src/components/course/CourseContextProvider.jsx 100.00% <100.00%> (ø)
src/components/course/CourseMainContent.jsx 100.00% <ø> (ø)
src/components/course/CoursePage.jsx 93.75% <100.00%> (ø)
src/components/course/CourseRecommendationCard.jsx 96.00% <100.00%> (+0.16%) ⬆️
src/components/course/CourseSidebar.jsx 100.00% <100.00%> (ø)
src/components/course/CourseSidebarListItem.jsx 100.00% <ø> (ø)
src/components/course/EnrollModal.jsx 93.54% <100.00%> (ø)
src/components/course/VerifiedCertPitch.jsx 100.00% <ø> (ø)
...c/components/course/course-header/CourseHeader.jsx 100.00% <100.00%> (ø)
.../components/course/course-header/CourseRunCard.jsx 100.00% <100.00%> (ø)
... and 120 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi marked this pull request as ready for review October 4, 2023 08:19
Copy link
Contributor

@kiram15 kiram15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you!

<Route path="/:enterpriseSlug" component={EnterpriseAppPageRoutes} />
<PageRoute path="*" component={NotFoundPage} />
</Switch>
<Route path="/:enterpriseSlug/*" element={<EnterpriseAppPageRoutes />} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious: why do we need to add the * at the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious: why do we need to add the * at the end?

React Router V6 handles nested routes a little bit differently. So in order to match the descendent routes we have to add this *. [ref]

Copy link
Contributor

@emrosarioa emrosarioa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with that one comment about the key prop

@macdiesel macdiesel merged commit 91f05b5 into master Oct 10, 2023
6 checks passed
@macdiesel macdiesel deleted the Ali-Abbas/react-router-upgrade branch October 10, 2023 19:32
@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi restored the Ali-Abbas/react-router-upgrade branch October 30, 2023 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants