diff --git a/apps/dokploy/components/dashboard/application/preview-deployments/preview-deployment-card.tsx b/apps/dokploy/components/dashboard/application/preview-deployments/preview-deployment-card.tsx
index c5b381eb..4d61fdec 100644
--- a/apps/dokploy/components/dashboard/application/preview-deployments/preview-deployment-card.tsx
+++ b/apps/dokploy/components/dashboard/application/preview-deployments/preview-deployment-card.tsx
@@ -1,134 +1,99 @@
-import { StatusTooltip } from "@/components/shared/status-tooltip";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
-import { Clock, GitBranch, GitPullRequest, Pencil } from "lucide-react";
+import { Clock, GitBranch, GitPullRequest } from "lucide-react";
import Link from "next/link";
import { ShowModalLogs } from "../../settings/web-server/show-modal-logs";
import { DialogAction } from "@/components/shared/dialog-action";
+import { api } from "@/utils/api";
import { ShowPreviewBuilds } from "./show-preview-builds";
-import { RouterOutputs } from "@/utils/api";
-import { AddPreviewDomain } from "./add-preview-domain";
import { DateTooltip } from "@/components/shared/date-tooltip";
interface PreviewDeploymentCardProps {
- appName: string;
- serverId: string;
- onDeploymentDelete: (deploymentId: string) => void;
- deploymentId: string;
- deploymentUrl: string;
- deployments: RouterOutputs["deployment"]["all"];
-
- domainId: string;
- domainHost: string;
-
- pullRequestTitle: string;
- pullRequestUrl: string;
- status: "running" | "error" | "done" | "idle" | undefined | null;
- branch: string;
- date: string;
- isLoading: boolean;
+ deploymentId: string;
+ serverId: string;
+ onDeploymentDelete: (deploymentId: string) => void;
+ isLoading: boolean;
}
export function PreviewDeploymentCard({
- appName,
- serverId,
-
- onDeploymentDelete,
- deploymentId,
- deployments,
-
- domainId,
- domainHost,
-
- pullRequestTitle,
- pullRequestUrl,
- isLoading,
- status,
- branch,
- date,
+ deploymentId,
+ serverId,
+ onDeploymentDelete,
+ isLoading,
}: PreviewDeploymentCardProps) {
- return (
-
-
- {pullRequestTitle}
-
-
- {status
- ?.replace("running", "Running")
- .replace("done", "Done")
- .replace("error", "Error")
- .replace("idle", "Idle") || "Idle"}
-
-
-
-
-
-
- {domainHost}
-
-
-
-
-
-
-
-
-
- Branch:
-
- {" "}
- {branch}
-
-
-
-
- Deployed:
-
-
-
-
-
-
-
-
Pull Request
-
-
-
- {pullRequestTitle}
-
-
-
-
-
-
-
+ const { data: previewDeployment } = api.previewDeployment.one.useQuery({
+ previewDeploymentId: deploymentId,
+ });
-
-
-
+ if (!previewDeployment) return null;
-
onDeploymentDelete(deploymentId)}
- >
-