这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@vishwansh01
Copy link

What kind of change does this PR introduce?
This PR refactors the logo state management logic in the sponsors/partners component by replacing 22 individual useState hooks with a single state object

Issue Number:

Screenshots/videos:
image

If relevant, did you update the documentation?
No

Summary
All logos are managed within a single state object

  • Cleaner codebase – reduces multiple useState calls to one.
  • Better performance – fewer state updates → fewer re-renders.
  • Improved readability & maintainability – all logos defined in one place.
  • Easier theming – simple toggle logic inside a single useEffect.
  • Easily extensible – adding or removing sponsors is trivial.

Does this PR introduce a breaking change?
No

Checklist

Please ensure the following tasks are completed before submitting this pull request.

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview 37122d7

@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (1a2d4a6) to head (37122d7).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1909   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines          633       633           
  Branches       196       196           
=========================================
  Hits           633       633           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready to review

Development

Successfully merging this pull request may close these issues.

Refactor: Replace multiple useState hooks for logos with a single useState<Record<string, string>>

1 participant