fix: unable to open deployment code template

This commit is contained in:
BennyKok
2024-01-20 14:27:01 +08:00
parent 163e6f0426
commit 1a0d73ff8b
2 changed files with 30 additions and 4 deletions
+24 -1
View File
@@ -5,7 +5,7 @@ import { getRelativeTime } from "@/lib/getRelativeTime";
import type { findAllDeployments } from "@/server/findAllRuns";
import { useRouter } from "next/navigation";
export function DeploymentRow({
export function SharePageDeploymentRow({
deployment,
}: {
deployment: Awaited<ReturnType<typeof findAllDeployments>>[0];
@@ -35,3 +35,26 @@ export function DeploymentRow({
</TableRow>
);
}
export function DeploymentRow({
deployment,
}: {
deployment: Awaited<ReturnType<typeof findAllDeployments>>[0];
}) {
return (
<>
<TableCell className="capitalize truncate">
{deployment.environment}
</TableCell>
<TableCell className="font-medium truncate">
{deployment.version?.version}
</TableCell>
<TableCell className="font-medium truncate">
{deployment.machine?.name}
</TableCell>
<TableCell className="text-right truncate">
{getRelativeTime(deployment.updated_at)}
</TableCell>
</>
);
}