-
Notifications
You must be signed in to change notification settings - Fork 32
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
refactor: useSynapsePauseData() #2921
refactor: useSynapsePauseData() #2921
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Base branches to auto review (3)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
b48c8fc
into
fe/maintenance-read-method
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.
PR Summary
Refactored code to use React hooks for fetching and managing maintenance data, improving reusability and maintainability.
- Updated
packages/synapse-interface/components/Maintenance/functions/fetchJsonData.test.ts
to use a new URL and added retry logic tests. - Renamed and refactored
packages/synapse-interface/components/Maintenance/hooks/useSynapsePauseData.ts
to a custom hook, introducinguseState
anduseCallback
. - Modified
packages/synapse-interface/utils/hooks/useMaintenanceListener.ts
to utilize the newuseSynapsePauseData
hook for consistency.
3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Bundle ReportChanges will increase total bundle size by 402.97kB ⬆️
|
* Fetch and store Maintenance data * Construct maintenance lists from fetched data * Use state to construct Maintenance components * Maintenance components working except for countdown * useMaintenance exports bridge maintenance components * Add Swap maintenance components in useMaintenance * Maintenance Banners exported from useMaintenance * Clean * Text size in Progress Bar * Prevent active chain pause clashes between diff instances * Clean * Use fetched paused bridge module list in Bridge * Clean * Organize * Type Maintenance State * Lift isFetching status to store * Organize * Add tests for fetchJSONData, implement retries * Use local data source as backup when fetch retries fail * useMaintenanceListener * Clean, fix current chain pause selection when only single pause exists * Clean, use jsdelivr urls * Revert package.json, remove jest command * Resolve file name * Add randomized query params to cache bust git rest api * Test URLs * Revert changes * No cache fetch request, update to gh pages cdn url * yarn * useSynapsePauseData hook (#2921)
null
dc052a2: synapse-interface preview link