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

Refactored code in src/user/admin.js #59

Open
wants to merge 1 commit into
base: f24
Choose a base branch
from

Conversation

hkkubais
Copy link

@hkkubais hkkubais commented Sep 2, 2024

I refactored the code in src/user/admin.js to reduce the nesting level. I did this by extracting the callback argument from the map function into a separate helper function, getUserFieldValue(field). This reduced the number of nested functions and improved code readability.

Resolves #57

Copy link

sonarcloud bot commented Sep 2, 2024

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10672165117

Details

  • 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage remained the same at 82.671%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/user/admin.js 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
src/meta/errors.js 1 83.72%
src/user/admin.js 1 72.46%
Totals Coverage Status
Change from base Build 10550029021: 0.0%
Covered Lines: 22323
Relevant Lines: 25583

💛 - Coveralls

@hkkubais hkkubais changed the title fixed the nesting issue Fixed the nesting issue in src/user/admin.js Sep 3, 2024
@hkkubais hkkubais changed the title Fixed the nesting issue in src/user/admin.js Refactored code in src/user/admin.js Sep 3, 2024
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.

Refactoring code in src/user/admin.js
2 participants