Closed AMIRKHANEF closed 2 weeks ago
The changes in this pull request focus on the View
component and the chooseTheme
function within the packages/extension-polkagate
directory. The View
component has been enhanced with improved state management using React hooks, specifically useState
and useEffect
, to handle theme changes based on local storage events. Additionally, the chooseTheme
function has a minor formatting change in its declaration. Overall, these modifications streamline the theme management process in the extension.
File Path | Change Summary |
---|---|
packages/extension-polkagate/src/components/View.tsx |
- Reorganized imports and expanded React import.- Updated View function signature spacing.- Changed state management to use useState directly.- Added useEffect for handling storage events related to theme.- Introduced useMemo for colorMode and theme variables.- Modified BodyTheme type declaration. |
packages/extension-polkagate/src/components/chooseTheme.ts |
- Adjusted function declaration spacing for chooseTheme . |
Objective | Addressed | Explanation |
---|---|---|
Change the theme from extension won't change the theme on FS (#1615) | ✅ |
🐰 In the land of themes, so bright and fair,
A toggle here, a change over there.
With hooks and states, we dance and play,
Light and dark, come what may!
Storage events, we heed their call,
A rabbit's joy in themes for all! 🌈
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?
Close: #1615
Summary by CodeRabbit
New Features
View
component to respond to local storage changes for theme settings, allowing for dynamic theme updates.View
component.Bug Fixes
Documentation