From 9ed53630e163c96326bb33519cb7952a754f71b9 Mon Sep 17 00:00:00 2001 From: Mikaal Naik Date: Tue, 25 Aug 2026 14:12:45 -0400 Subject: [PATCH] Make the whole project card clickable The card on /projects now wraps its contents in the project link instead of hiding navigation behind the View Project button. The footer keeps its label and arrow, driven by hover on the card. Co-Authored-By: Claude Opus 5 --- src/components/widgets/WidgetCard.tsx | 84 ++++++++++++++++++--------- 1 file changed, 55 insertions(+), 29 deletions(-) diff --git a/src/components/widgets/WidgetCard.tsx b/src/components/widgets/WidgetCard.tsx index 57ef5a7b..52fbf6f3 100644 --- a/src/components/widgets/WidgetCard.tsx +++ b/src/components/widgets/WidgetCard.tsx @@ -1,6 +1,6 @@ "use client"; -import { Button } from "@/components/ui/button"; +import Link from "next/link"; import registry from "./registry"; import WidgetPlaceholder from "./WidgetPlaceholder"; import { ProjectData } from "./types"; @@ -9,19 +9,41 @@ const INTERNAL_HREFS: Record = { "outcomes-tracker": "/tracker", }; +function Arrow({ external }: { external: boolean }) { + return ( + + + + ); +} + export default function WidgetCard({ project }: { project: ProjectData }) { const Widget = registry[project.slug]; const isBig = project.featured; const internalHref = INTERNAL_HREFS[project.slug]; - return ( -
+ const cardClasses = `group/card flex flex-col h-full border border-border-light hover:border-dark transition-colors ${ + isBig ? "min-h-[380px] md:min-h-[340px] md:col-span-2" : "min-h-[360px]" + }`; + + const content = ( + <>
{Widget ? ( @@ -30,26 +52,30 @@ export default function WidgetCard({ project }: { project: ProjectData }) { )}
- {internalHref ? ( - - ) : ( - - )} + + View Project + +
-
+ + ); + + if (internalHref) { + return ( + + {content} + + ); + } + + return ( + + {content} + ); }