@@ -13,6 +13,7 @@ import Link from "next/link";
1313import { apiFetch } from "@/lib/api" ;
1414import { useAppContext } from "@/providers/app-context" ;
1515import { hasAppAccess } from "@/lib/utils" ;
16+ import { useRouter } from "next/navigation" ;
1617
1718export type ApiRelease = {
1819 id : string ;
@@ -26,6 +27,7 @@ export type ApiRelease = {
2627} ;
2728
2829export default function ReleasesPage ( ) {
30+ const router = useRouter ( ) ;
2931 const [ searchQuery , setSearchQuery ] = useState ( "" ) ;
3032 const [ filterStatus , setFilterStatus ] = useState ( "all" ) ;
3133 const { token, org, app, getAppAccess, getOrgAccess } = useAppContext ( ) ;
@@ -102,26 +104,35 @@ export default function ReleasesPage() {
102104 { releases
103105 . filter ( ( r ) => ( filterStatus === "all" ? true : r . experiment ?. status === filterStatus ) )
104106 . map ( ( r ) => (
105- < TableRow key = { r . id } >
107+ < TableRow
108+ key = { r . id }
109+ className = "cursor-pointer hover:bg-muted "
110+ onClick = { ( ) =>
111+ router . push (
112+ `/dashboard/${ encodeURIComponent ( org || "" ) } /${ encodeURIComponent ( app || "" ) } /releases/${ encodeURIComponent ( r . id ) } `
113+ )
114+ }
115+ >
106116 < TableCell className = "font-mono text-sm" >
107- < Link
108- href = { `/dashboard/${ encodeURIComponent ( org || "" ) } /${ encodeURIComponent ( app || "" ) } /releases/${ encodeURIComponent ( r . id ) } ` }
109- className = "hover:text-primary"
110- >
111- { r . id }
112- </ Link >
117+ < div className = "block w-full h-full" > { r . id } </ div >
118+ </ TableCell >
119+ < TableCell className = "text-muted-foreground" >
120+ < div className = "block w-full h-full" > { r . package ?. version ?? "—" } </ div >
113121 </ TableCell >
114- < TableCell className = "text-muted-foreground" > { r . package ?. version ?? "—" } </ TableCell >
115122 < TableCell >
116- { r . experiment ?. status != "INPROGRESS" && (
117- < Badge variant = "outline" > { r . experiment ?. status || "—" } </ Badge >
118- ) }
119- { r . experiment ?. status == "INPROGRESS" && (
120- < Badge variant = "outline" > Ramping to { r . experiment ?. traffic_percentage || "—" } %</ Badge >
121- ) }
123+ < div className = "block w-full h-full" >
124+ { r . experiment ?. status != "INPROGRESS" && (
125+ < Badge variant = "outline" > { r . experiment ?. status || "—" } </ Badge >
126+ ) }
127+ { r . experiment ?. status == "INPROGRESS" && (
128+ < Badge variant = "outline" > Ramping to { r . experiment ?. traffic_percentage || "—" } %</ Badge >
129+ ) }
130+ </ div >
122131 </ TableCell >
123132 < TableCell className = "text-muted-foreground" >
124- { r . created_at ? new Date ( r . created_at ) . toLocaleString ( ) : "—" }
133+ < div className = "block w-full h-full" >
134+ { r . created_at ? new Date ( r . created_at ) . toLocaleString ( ) : "—" }
135+ </ div >
125136 </ TableCell >
126137 { /* <TableCell className="flex gap-2">
127138 <Button size="sm" variant="outline" onClick={() => rampRelease(r.id)}>
0 commit comments