Uh oh!
There was an error while loading. Please reload this page.
Dix - #52
Merged
Merged
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
🎯 Overview
This PR refactors the frontend codebase to improve code organization, maintainability, and user experience through component extraction, custom hooks, and profile management enhancements.
✨ Key Changes
Component Modularization
Navbar.jsinto reusable sub-components:AvatarMenu.js- User avatar and account menuNavbarMenu.jsx- Navigation menu itemsProviders.jsscreen with extracted components:ProviderSearch.js- Search input componentProviderList.jsx- Provider list display with loading statesVMConfigForm.jsx- VM configuration formProfile.jsscreen with extracted components:ProfileHeader.jsx- User profile display sectionProfileTabs.jsx- Tabbed interface for Projects/ClientsEditProfileModal.js- Profile update modalCustom Hooks
Introduced 5 new custom hooks for better state management and reusability:
useAccount.js- Centralized user account data fetchinguseNavbarScroll.js- Navbar visibility on scroll behavioruseClickOutside.js- Reusable click-outside detection for dropdownsuseProfile.js- Combined user, providers, and clients data fetchinguseProviders.js- Provider search with debouncing supportNew Features
Code Quality Improvements
userUtils.js- ExtractedgetInitials()utility function to eliminate duplicationMinor Updates
.gitignoreto exclude build folder📊 Statistics
🧪 Testing
🔗 Related Issues
#51
#48
📝 Notes
This refactoring maintains all existing functionality while significantly improving code organization and reusability. Future enhancements can now leverage the new custom hooks and modular components.