Refactor components and code base in general#17
Merged
reenatoteixeira merged 8 commits intostagefrom Mar 30, 2026
Merged
Conversation
…us color variables
…e DashboardPage to use new structure and props
…lor and spacing consistency
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 free
to 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.
This pull request refactors and improves the dashboard module, focusing on component modularization, type safety, and consistent styling. Key changes include extracting types and props for better maintainability, updating component exports/imports, improving style consistency, and enhancing the dashboard's data flow and UI structure.
Dashboard Component Refactoring and Modularization:
DashboardHeadercomponent and inlined its content directly intoDashboardPage, simplifying the header structure. [1] [2]StatsSkeletonandRecentOrderscomponents into dedicated folders and updated their exports. [1] [2] [3]Type Safety and Data Flow Improvements:
Order,OrderStatus, andRecentOrdersPropstypes into a separate types file, ensuring consistent usage across components. [1] [2] [3]RecentOrderscomponent to receiveordersas a prop instead of using hardcoded data, allowing dynamic rendering based on parent state. [1] [2] [3]Chart Component Enhancement:
OrdersChartto a genericChartcomponent, extracted its props and types, and made it accept dynamic data, title, and description. Improved color theming based on user preference. [1] [2] [3] [4] [5]Styling and UI Consistency:
Cleanup and Removal of Unused Code:
RecentOrdersSkeletoncomponent and cleaned up related imports.These changes collectively improve code maintainability, type safety, and user interface consistency across the dashboard module.