Skip to content

Commit c9dd109

Browse files
authored
Merge pull request #13 from tomphill/claude/issue-9-20250929-2131
Make workouts clickable on dashboard page
2 parents abf70e5 + 6707fb5 commit c9dd109

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/app/dashboard/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { format } from "date-fns";
33
import { CalendarClient } from "./calendar-client";
44
import { Button } from "@/components/ui/button";
55
import { Suspense } from "react";
6+
import Link from "next/link";
67

78
interface DashboardPageProps {
89
searchParams: Promise<{ date?: string }>;
@@ -45,9 +46,10 @@ async function DashboardContent({ searchParams }: { searchParams: { date?: strin
4546
<div className="space-y-4">
4647
{workouts.length > 0 ? (
4748
workouts.map((workout) => (
48-
<div
49+
<Link
4950
key={workout.id}
50-
className="border rounded-lg p-4 hover:shadow-md transition-shadow"
51+
href={`/dashboard/workout/${workout.id}`}
52+
className="block border rounded-lg p-4 hover:shadow-md transition-shadow"
5153
>
5254
<div className="flex justify-between items-start mb-2">
5355
<h3 className="font-semibold text-lg">{workout.name}</h3>
@@ -70,7 +72,7 @@ async function DashboardContent({ searchParams }: { searchParams: { date?: strin
7072
)}
7173
</div>
7274
</div>
73-
</div>
75+
</Link>
7476
))
7577
) : (
7678
<div className="border rounded-lg p-8 text-center">

0 commit comments

Comments
 (0)