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: add course reset tab to learner's information #376

Merged
merged 6 commits into from
Mar 14, 2024

Conversation

hajorg
Copy link
Contributor

@hajorg hajorg commented Feb 23, 2024

Summary

https://2u-internal.atlassian.net/browse/AU-1845

Adds Course Reset tab to Learner's Information.
Screenshot 2024-02-23 at 15 45 11

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.34%. Comparing base (b70c6d2) to head (1cd0f79).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #376      +/-   ##
==========================================
+ Coverage   88.10%   88.34%   +0.23%     
==========================================
  Files         162      164       +2     
  Lines        3380     3448      +68     
  Branches      836      850      +14     
==========================================
+ Hits         2978     3046      +68     
  Misses        398      398              
  Partials        4        4              

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

@hajorg hajorg marked this pull request as ready for review March 4, 2024 13:20
},
]}
data={renderResetData}
styleName="custom-table"

Choose a reason for hiding this comment

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

is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently, this is needed for the table style. I'm sorry for the confusion

return () => clearInterval(intervalId);
}, [courseResetData]);

const handleSubmit = async (courseID) => {

Choose a reason for hiding this comment

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

write it with useCallback.

close();
};

useEffect(() => {

Choose a reason for hiding this comment

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

this useEffect should be able to combine.

useEffect(() => {
fetchData();
if (data)
...(above code)
else(error)
}, []);

Choose a reason for hiding this comment

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

isMounted is unnecessary because [] already make sure it run only once.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you explain what you mean by this useEffect should be able to combine., please?

For the isMounted part, I was getting a warning when running test which is why I added it.

Copy link

@leangseu-edx leangseu-edx left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@Ali-D-Akbar Ali-D-Akbar left a comment

Choose a reason for hiding this comment

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

Haven't tested this locally but the changes look good to me.

@hajorg hajorg merged commit 94aeaff into master Mar 14, 2024
7 checks passed
@hajorg hajorg deleted the hajorg/au-1845-whole-course-reset branch March 14, 2024 17:10
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.

3 participants