Merge pull request #5657 from Totopo27/feat/gh-5546-clickable-projects-card-home

feat(ui): make projects card clickable on home dashboard
This commit is contained in:
Narciso E. Núñez Arias
2026-10-12 10:37:53 -04:00
committed by GitHub
@@ -45,13 +45,19 @@ function StatCard({
label,
value,
delta,
href,
}: {
label: string;
value: string;
delta?: string;
href?: string;
}) {
return (
<div className="rounded-xl border bg-background p-5 min-h-[140px] flex flex-col justify-between">
const content = (
<div
className={`rounded-xl border bg-background p-5 min-h-[140px] flex flex-col justify-between h-full ${
href ? "transition-colors hover:bg-muted/40 cursor-pointer" : ""
}`}
>
<span className="text-xs uppercase tracking-wider text-muted-foreground">
{label}
</span>
@@ -63,6 +69,16 @@ function StatCard({
</div>
</div>
);
if (href) {
return (
<Link href={href} className="block h-full">
{content}
</Link>
);
}
return content;
}
function StatusListCard({
@@ -182,6 +198,7 @@ export const ShowHome = () => {
label="Projects"
value={String(totals.projects)}
delta={`${totals.environments} ${totals.environments === 1 ? "environment" : "environments"}`}
href="/dashboard/projects"
/>
<StatCard
label="Services"