Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Fix intitial latest deployment retrieval

Tomas Valentaad07b86fccc6
diff --git a/hooks/useLatestDeployment.tsx b/hooks/useLatestDeployment.tsx
index 8da0fd51b..e8cbb20f5 100644
--- a/hooks/useLatestDeployment.tsx
+++ b/hooks/useLatestDeployment.tsx
@@ -21,11 +21,12 @@ export function useLatestDeployment(project: projects, route?: Route) {
.select('*')
.eq('project_id', project.id)
.eq('route_id', route.id)
- .order('created_at')
+ .order('created_at', { ascending: false })
.limit(1)
.single()
if (deployment.error) return
+ console.log(deployment.data)
setInitDeployment(deployment.data as unknown as deployments)
}())
}, [client, project.id, route?.id])