-
Notifications
You must be signed in to change notification settings - Fork 260
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
[🧹 UNIFICATION CLEANUP] Refactor extensions/components
directory
#6882
base: master
Are you sure you want to change the base?
Conversation
bd23e5d
to
2bccd03
Compare
cb3df77
to
7fe5d52
Compare
extensions/components
directory
const { data, error, isValidating, mutate } = useRequest<Data, Error>( | ||
requestConfig | ||
); | ||
|
||
return { | ||
data, | ||
error, | ||
isLoading: !data && !error, | ||
isValidating, | ||
mutate | ||
}; | ||
}; |
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.
Moving forward we can directly use isLoading
property from swr hook. Please check other places as well
const { data, error, isValidating, mutate } = useRequest<Data, Error>( | |
requestConfig | |
); | |
return { | |
data, | |
error, | |
isLoading: !data && !error, | |
isValidating, | |
mutate | |
}; | |
}; | |
const { data, error, isLoading, isValidating, mutate } = useRequest<Data, Error>( | |
requestConfig | |
); | |
return { | |
data, | |
error, | |
isLoading, | |
isValidating, | |
mutate | |
}; | |
}; |
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.
+1
However, since this PR only focuses on refactoring the existing files and logic, lets not do any drastic logic changes to avoid regressions.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6882 +/- ##
=======================================
Coverage 31.79% 31.79%
=======================================
Files 41 41
Lines 890 890
Branches 204 220 +16
=======================================
Hits 283 283
+ Misses 607 557 -50
- Partials 0 50 +50
Flags with carried forward coverage won't be shown. Click here to find out more. |
e89f164
to
8900f53
Compare
🦋 Changeset detectedThe changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. |
Purpose
Completely refactor the
admin.extensions.v1/components
directly and move the logic to related features.Related Issues
Related PRs
Checklist
Security checks