Feature/reusable kpi issue fix#169
Merged
therealjhay merged 3 commits intoJul 1, 2026
Merged
Conversation
…lue, icon, trend, color (amber/blue/emerald/purple/primary), variant (default/destructive), className. Handles gradient overlay, icon in rounded box, and trend display internally. Replaced inline stat cards (11 total → 0): - app/(merchant)/dashboard/page.tsx — 4 cards replaced (amber/blue/emerald/purple) - app/(merchant)/settlement/page.tsx — 3 cards replaced (1 amber gradient, 2 with trend icons) - app/(admin)/overview/page.tsx — 4 cards replaced (3 default, 1 destructive variant)
|
@connelevalsam is attempting to deploy a commit to the therealjhay's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@connelevalsam Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Kindly resolve conflicts |
Contributor
Author
|
conflicts resolved successfully |
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.
Description
Extracted the repeated KPI stat card pattern (~11 instances across 3 pages) into a reusable StatCard component at components/shared/StatCard.tsx. Props: title, value (ReactNode), icon, trend (with optional icon + color), color (amber/blue/emerald/purple/primary), and variant (default/destructive). The component handles the gradient overlay, icon-in-rounded-box, and trend display internally. Reduces ~100 lines of duplicated Card boilerplate.
Trade-off: Admin overview cards had a distinct visual style (bare icons, normal-case titles) that was standardized to the dashboard pattern (rounded icon boxes, uppercase titles) for consistency. The destructive variant preserves the original destructive colour scheme.
Fixes / Closes: #74
Type of Change
Verification & Test Plan
Please outline how you verified these changes. Include steps to reproduce, test scripts, or command logs where applicable.
Automated Tests
For example:
cargo testin contract package,pnpm testin backend.Manual Verification
Sub-System Checklist
1. Smart Contracts (
BettaPay-Contract)cargo build --release --target wasm32-unknown-unknown)cargo test)auth.require_auth())2. Backend Services (
BettaPay-Backend)pnpm build).env.example3. Frontend Dashboard (
BettaPay-Frontend)pnpm build).env.localChecklist