Skip to content

Refactor to use global Card component and remove deprecated elements#15

Merged
rafaelhgcarlos merged 3 commits intostagefrom
refactor/dashboard-layout
Mar 28, 2026
Merged

Refactor to use global Card component and remove deprecated elements#15
rafaelhgcarlos merged 3 commits intostagefrom
refactor/dashboard-layout

Conversation

@rafaelhgcarlos
Copy link
Copy Markdown
Member

This pull request refactors the dashboard statistics system by introducing a reusable global Card component and removing the deprecated StatsCard and StatsGrid. The goal is to simplify the dashboard structure and centralize card UI logic in the shared layer.

Key changes:

Reusable Card Component

  • Introduces a global Card component with configurable variant, size, and background. (src/shared/components/Card/Card.tsx)
  • Adds style and configuration layers for card layout and states. (src/shared/components/Card/Card.styles.ts)
  • Defines strong typing for the component props. (src/shared/components/Card/Card.types.ts)
  • Exports the component through a central index file. (src/shared/components/Card/index.ts)

Dashboard Refactor

  • Replaces StatsCard usage with the new shared Card component. (src/modules/dashboard/pages/DashboardPage.tsx)
  • Moves the grid layout directly into the dashboard page for simpler structure.

Removed Components

  • Removes deprecated StatsCard. (src/modules/dashboard/components/StatsCard.tsx)
  • Removes deprecated StatsGrid. (src/modules/dashboard/components/StatsGrid.tsx)

Result

  • Reduces component duplication.
  • Improves UI consistency through a shared component.
  • Simplifies the dashboard layout and maintenance.

@rafaelhgcarlos rafaelhgcarlos self-assigned this Mar 28, 2026
@rafaelhgcarlos rafaelhgcarlos added the enhancement New feature or request label Mar 28, 2026
@rafaelhgcarlos rafaelhgcarlos merged commit b737df2 into stage Mar 28, 2026
2 checks passed
@rafaelhgcarlos rafaelhgcarlos deleted the refactor/dashboard-layout branch March 28, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant