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

Reduce card data fetching complexity #115

Merged
merged 3 commits into from
Nov 18, 2024
Merged

Reduce card data fetching complexity #115

merged 3 commits into from
Nov 18, 2024

Conversation

benvinegar
Copy link
Owner

This does a few things:

  • In PaginatedTableCard, refactors page to be a state variable (using useState), with corresponding data fetches occurring automatically via useEffect
  • Instead of manually assembling query strings when calling dataFetcher.load, instead passes a dictionary of params to dataFetcher.submit
  • Removes redundant useEffect calls with no dependencies (these didn't do anything)
  • Removes some eslint warnings

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.71%. Comparing base (54edba1) to head (45cef60).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
app/components/PaginatedTableCard.tsx 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #115      +/-   ##
==========================================
- Coverage   72.90%   72.71%   -0.20%     
==========================================
  Files          32       32              
  Lines        2233     2210      -23     
  Branches      222      205      -17     
==========================================
- Hits         1628     1607      -21     
+ Misses        597      595       -2     
  Partials        8        8              

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

@benvinegar benvinegar merged commit 564f955 into main Nov 18, 2024
3 checks passed
@benvinegar benvinegar deleted the fix-eslint-warnings branch November 18, 2024 04:09
benvinegar added a commit that referenced this pull request Dec 20, 2024
* Simplify useEffect/loader usage in resources.stats.tsx

* Better state management/loader usage

* Fix comment
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.

1 participant