diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId].tsx
index 89d77af24..07a7396e2 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId].tsx
@@ -23,7 +23,7 @@ import type {
InferGetServerSidePropsType,
} from "next";
import Head from "next/head";
-import { useRouter } from "next/router";
+import Link from "next/link";
import { type ReactElement, useEffect, useMemo, useState } from "react";
import { toast } from "sonner";
import superjson from "superjson";
@@ -358,7 +358,6 @@ const EnvironmentPage = (
environmentId,
});
const { data: allProjects } = api.project.all.useQuery();
- const router = useRouter();
const [isMoveDialogOpen, setIsMoveDialogOpen] = useState(false);
const [selectedTargetProject, setSelectedTargetProject] =
@@ -412,6 +411,7 @@ const EnvironmentPage = (
};
const handleServiceSelect = (serviceId: string, event: React.MouseEvent) => {
+ event.preventDefault();
event.stopPropagation();
setSelectedServices((prev) =>
prev.includes(serviceId)
@@ -1463,101 +1463,99 @@ const EnvironmentPage = (
{filteredServices?.map((service) => (
-
{
- router.push(
- `/dashboard/project/${projectId}/environment/${environmentId}/services/${service.type}/${service.id}`,
- );
- }}
- className="flex flex-col group relative cursor-pointer bg-transparent transition-colors hover:bg-border"
+ href={`/dashboard/project/${projectId}/environment/${environmentId}/services/${service.type}/${service.id}`}
+ className="block"
>
- {service.serverId && (
-
-
-
- )}
-
-
-
-
-
- handleServiceSelect(service.id, e)
- }
- >
-
-
-
-
-
-
-
-
-
-
- {service.name}
-
- {service.description && (
-
- {service.description}
-
- )}
-
-
-
- {service.type === "postgres" && (
-
- )}
- {service.type === "redis" && (
-
- )}
- {service.type === "mariadb" && (
-
- )}
- {service.type === "mongo" && (
-
- )}
- {service.type === "mysql" && (
-
- )}
- {service.type === "application" && (
-
- )}
- {service.type === "compose" && (
-
- )}
-
+
+ {service.serverId && (
+
+
-
-
-
-
- {service.serverName && (
-
-
-
- {service.serverName}
+ )}
+
+
+
+
+
+ handleServiceSelect(service.id, e)
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+ {service.name}
+
+ {service.description && (
+
+ {service.description}
+
+ )}
+
+
+
+ {service.type === "postgres" && (
+
+ )}
+ {service.type === "redis" && (
+
+ )}
+ {service.type === "mariadb" && (
+
+ )}
+ {service.type === "mongo" && (
+
+ )}
+ {service.type === "mysql" && (
+
+ )}
+ {service.type === "application" && (
+
+ )}
+ {service.type === "compose" && (
+
+ )}
- )}
-
- Created
-
-
-
-
+
+
+
+
+ {service.serverName && (
+
+
+
+ {service.serverName}
+
+
+ )}
+
+ Created
+
+
+
+
+
))}