Skip to content

feat: link dashboard stat cards to pre-filtered contract views#160

Open
Chrisland58 wants to merge 1 commit into
Tx-wat:mainfrom
Chrisland58:feat/dashboard-filtered-contract-links
Open

feat: link dashboard stat cards to pre-filtered contract views#160
Chrisland58 wants to merge 1 commit into
Tx-wat:mainfrom
Chrisland58:feat/dashboard-filtered-contract-links

Conversation

@Chrisland58
Copy link
Copy Markdown

Allow users to jump from dashboard summary cards into pre-filtered contract views

The three stat cards on the dashboard (Contracts Watched, Alerts Today, Active Webhooks) were
static display-only elements. This PR makes them clickable links that navigate to the contracts
list with an appropriate filter applied.

Changes:

  • app/dashboard/page.tsx — converted stat cards from
    to with hover:border-zinc-600
    hover state, pointing to /contracts, /contracts?filter=alerts, and /contracts?filter=webhooks
  • app/contracts/page.tsx — reads ?filter via useSearchParams() and filters the contract list
    accordingly:
    • filter=alerts — contracts with at least one alert since midnight today
    • filter=webhooks — contracts with an active webhook URL
    • no param — all contracts (unchanged behaviour)
    • Active filter is shown in the subtitle with a "clear filter" link back to /contracts

Testing:

  • Navigate to the dashboard with contracts registered; click each stat card and verify the
    correct subset is shown
  • Verify "clear filter" returns to the full list
  • Verify no regression when no contracts are registered
  • closes Add dashboard quick filters #77

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@Chrisland58 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! 🚀

Learn more about application limits

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.

Add dashboard quick filters

1 participant