Closed AMIRKHANEF closed 5 days ago
The recent updates focus on restructuring how useProfiles
is accessed and utilized across multiple components. Instead of a single profiles
variable, the code now specifically deals with userDefinedProfiles
and, where necessary, defaultProfiles
separately. The changes were made to ProfileInput.tsx
, ProfileMenu.tsx
, ProfileTabs.tsx
, and useProfiles.ts
to enhance code clarity and maintainability.
Files | Change Summary |
---|---|
packages/extension-polkagate/src/components/ProfileInput.tsx |
Updated to use userDefinedProfiles in place of profiles for accessing profile data and for managing autocomplete options and popper state. |
packages/.../fullscreen/homeFullScreen/partials/ProfileMenu.tsx |
Renamed profiles to userDefinedProfiles and updated its usage within the component. |
packages/.../fullscreen/homeFullScreen/partials/ProfileTabs.tsx |
Destructured useProfiles into defaultProfiles and userDefinedProfiles . Updated profilesToShow logic and modified handleWheel for both vertical and horizontal scrolling. |
packages/extension-polkagate/src/hooks/useProfiles.ts |
Restructured Profiles type to explicitly define userDefinedProfiles and defaultProfiles . Updated useProfiles to return an object with empty arrays for userDefinedProfiles and defaultProfiles when accounts is falsy. |
In the realm of code, changes bloom,
useProfiles
finds its proper room.
Default and user-defined, now split with care,
Each profile shines, beyond compare. 🌟
Efficiency gained, bugs drift away,
The code in PolkaGate, dances today! 🐰✨
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?
Works Done
Close: #1390
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
userDefinedProfiles
anddefaultProfiles
) for better maintainability and clarity.