Skip to content

feat: create reusable CaseCard component and refactor LitigantDashboard#412

Open
shivashanker123 wants to merge 2 commits into
viru0909-dev:mainfrom
shivashanker123:feature/reusable-casecard-component
Open

feat: create reusable CaseCard component and refactor LitigantDashboard#412
shivashanker123 wants to merge 2 commits into
viru0909-dev:mainfrom
shivashanker123:feature/reusable-casecard-component

Conversation

@shivashanker123
Copy link
Copy Markdown

Description

Creates the CaseCard reusable component (previously an empty file) and refactors LitigantDashboard.jsx to use it instead of duplicated inline styles.

Core Architectural Changes:

  • src/components/dashboard/CaseCard.jsx — Implemented from scratch with modular props (id, fullId, title, status, date, onClick), dynamic color-coded status badges, smooth hover lift transitions (translate-y), and full dark-mode awareness using existing CSS global variables.
  • src/pages/litigant/LitigantDashboard.jsx — Successfully refactored and eliminated ~45 lines of repetitive inline layout mappings, replacing them with standard, clean <CaseCard /> component iterations.

Closes #366


📸 Technical Code Breakdown (Before vs. After)

Click to expand code screenshots

🔴 Duplicated Mapping Layout (Before)

Screenshot 2026-05-17 091034

🟢 Clean Reusable Component Implementation (After)

Screenshot 2026-05-17 085533

🌓 Verified Layout Render

Screenshot 2026-05-17 083844

Type of change

  • New feature (non-breaking change which adds functionality/improves structure)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

@shivashanker123 is attempting to deploy a commit to the CodeBlooded's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nyaysetu Ready Ready Preview, Comment May 19, 2026 2:54pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]:Create Reusable CaseCard Component & Refactor LitigantDashboard

1 participant