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: resolve recommendations query mismatch between ui and loader #1032

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

adamstankiewicz
Copy link
Member

@adamstankiewicz adamstankiewicz commented Apr 5, 2024

https://2u-internal.atlassian.net/browse/ENT-8739

image

image

(Same errors; one is minified).

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)
  • Ensure English strings are marked for translation. See documentation for more details.

Only if submitting a visual change

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

return useQuery({
...queryCouponCodes(enterpriseCustomer.uuid),
...queryOptionsRest,
select: (data) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved to service function, so the transform is shared between the UI layer and the route loader layer.

@@ -26,7 +26,7 @@ const CoursePage = () => {
]);

// If there isn't an active course run we don't show the course at all
if (!courseMetadata.activeCourseRun) {
if (!courseMetadata?.activeCourseRun) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Resolves a separate bug if you load course page with bogus course key and courseMetadata is expected to be null or undefined.

@adamstankiewicz adamstankiewicz merged commit 0a61d41 into master Apr 5, 2024
4 of 5 checks passed
@adamstankiewicz adamstankiewicz deleted the ags/ent-8739 branch April 5, 2024 20:20
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