-
Notifications
You must be signed in to change notification settings - Fork 19
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: modifies logic for setting cookies on dashboard page load #881
Merged
Merged
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0c5823a
feat: modifies logic for setting cookies on dashboard page load
brobro10000 98001a8
chore: tests
brobro10000 4fb6173
chore: cleanup
brobro10000 59074f7
fix: typo in test name
brobro10000 0c1018f
chore: PR fixes with corresponding tests
brobro10000 fe1da50
chore: pr cleanup
brobro10000 c1f3141
chore: PR fixes
brobro10000 88213ce
chore: PR cleanup
brobro10000 9727e9f
chore: more PR fixes
brobro10000 0ceba9a
fix: added failsafe default value for undefined 'assignments'
brobro10000 20e3c7d
chore: redundant logic removed
brobro10000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[suggestion, non-blocking] Looks like logic to generate a flat map of assignments based on the learner credit policies happens in two places now. I'm wondering if it'd be worth abstracting this logic out to where we get the response about redeemable learner credit policies from the
credits_available
API so components such as this one don't need to run their own.flatMap
to get a list of assignments.E.g.,
useRedeemableLearnerCreditPolicies
and its query functiongetRedeemablePoliciesData
could return a data structure more along the lines of the following, where it splits outredeemablePolicies
vs.learnerContentAssignments
:Any component that relies on an assignments list could rely on
learnerContentAssignments
returned by the hook instead of having to re-compute the.flatMap
each time. Then, the same line in theisDisableCourseSearch
function could be simplified to:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opted to resolve this in a followup PR to focus on the MVP, but intended to resolve immediately following the validation of functionality of this PR in stage/prod environment. Updated ticket to document the decision.