refactor: add missing running state

This commit is contained in:
Mauricio Siu
2024-12-24 14:31:05 -06:00
parent 8410d94283
commit 0535d780b1

View File

@@ -92,6 +92,7 @@ export const ShowPreviewDeployments = ({ applicationId }: Props) => {
<div className="flex flex-col gap-4"> <div className="flex flex-col gap-4">
{previewDeployments?.map((deployment) => { {previewDeployments?.map((deployment) => {
const deploymentUrl = `${deployment.domain?.https ? "https" : "http"}://${deployment.domain?.host}${deployment.domain?.path || "/"}`; const deploymentUrl = `${deployment.domain?.https ? "https" : "http"}://${deployment.domain?.host}${deployment.domain?.path || "/"}`;
const status = deployment.previewStatus;
return ( return (
<div <div
key={deployment.previewDeploymentId} key={deployment.previewDeploymentId}
@@ -99,9 +100,11 @@ export const ShowPreviewDeployments = ({ applicationId }: Props) => {
> >
<div <div
className={`absolute left-0 top-0 w-1 h-full ${ className={`absolute left-0 top-0 w-1 h-full ${
deployment.previewStatus === "running" status === "done"
? "bg-green-500" ? "bg-green-500"
: "bg-red-500" : status === "running"
? "bg-yellow-500"
: "bg-red-500"
}`} }`}
/> />