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

fix: removes duplicate redirect #904

Merged
merged 2 commits into from
Dec 14, 2023
Merged

fix: removes duplicate redirect #904

merged 2 commits into from
Dec 14, 2023

Conversation

brobro10000
Copy link
Member

Updates redirect logic for routes /:slug/:courseType/course/:courseKey/enroll to not pass a onCheckoutSuccess function, and depend on the existing onSuccessfulRedemption logic in the useEffect to avoid duplicate redirects.

Also refactors the path name generation using generatePath instead of pushing (appending) to the end of a url.

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

Copy link
Member

@adamstankiewicz adamstankiewicz 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 a tiny nit, and when CI is passing (currently pending) :)

src/components/course/routes/ExternalCourseEnrollment.jsx Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

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

Comparison is base (d36b78a) 84.87% compared to head (d9f05ac) 84.96%.
Report is 106 commits behind head on master.

Files Patch % Lines
src/components/search/Search.jsx 0.00% 29 Missing ⚠️
...ntent/course-enrollments/CourseAssignmentAlert.jsx 27.27% 8 Missing ⚠️
src/components/course/data/hooks.jsx 88.70% 7 Missing ⚠️
...course-enrollments/course-cards/BaseCourseCard.jsx 89.85% 7 Missing ⚠️
src/components/my-career/VisualizeCareer.jsx 74.07% 6 Missing and 1 partial ⚠️
src/components/my-career/data/service.js 56.25% 7 Missing ⚠️
src/components/course/data/utils.jsx 95.89% 6 Missing ⚠️
src/components/my-career/AddJobRole.jsx 60.00% 5 Missing and 1 partial ⚠️
src/components/my-career/data/hooks.jsx 50.00% 6 Missing ⚠️
...rc/components/search/AssignmentsOnlyEmptyState.jsx 0.00% 6 Missing ⚠️
... and 28 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #904      +/-   ##
==========================================
+ Coverage   84.87%   84.96%   +0.08%     
==========================================
  Files         320      338      +18     
  Lines        6399     7088     +689     
  Branches     1552     1733     +181     
==========================================
+ Hits         5431     6022     +591     
- Misses        941     1035      +94     
- Partials       27       31       +4     

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

@brobro10000 brobro10000 merged commit e1d8c5d into master Dec 14, 2023
6 checks passed
@brobro10000 brobro10000 deleted the hu/ent-8127-3 branch December 14, 2023 15:30
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.

2 participants