diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index 7a287f8..bcb4bad 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -84,17 +84,22 @@ export default async function DashboardPage() { const { data: hacks } = await supa .from("hacks") - .select("slug,title,approved,updated_at,downloads,current_patch,version,created_at,original_author") + .select("slug,title,approved,updated_at,downloads,current_patch(id,version),created_at,original_author") .eq("created_by", user.id) - .is("original_author", null) // Exclude Archive hacks .order("updated_at", { ascending: false }); + const hacksWithVersions = hacks?.map((h) => ({ + ...h, + version: h.current_patch?.version || "Pre-release", + current_patch: h.current_patch?.id || null, + })); + const seriesAll = await getDownloadsSeriesAll({ days: 30 }); return (