Skip to content

Commit 092afbe

Browse files
committed
fix(dashboard): update project environment link to use default production environment
- Modified the project environment link to reference the default production environment instead of the first environment in the list, improving accuracy in navigation.
1 parent a32e7e0 commit 092afbe

File tree

1 file changed

+5
-1
lines changed
  • apps/dokploy/components/dashboard/projects

1 file changed

+5
-1
lines changed

apps/dokploy/components/dashboard/projects/show.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,17 @@ export const ShowProjects = () => {
286286
)
287287
.some(Boolean);
288288

289+
const productionEnvironment = project?.environments.find(
290+
(env) => env.isDefault,
291+
);
292+
289293
return (
290294
<div
291295
key={project.projectId}
292296
className="w-full lg:max-w-md"
293297
>
294298
<Link
295-
href={`/dashboard/project/${project.projectId}/environment/${project?.environments?.[0]?.environmentId}`}
299+
href={`/dashboard/project/${project.projectId}/environment/${productionEnvironment?.environmentId}`}
296300
>
297301
<Card className="group relative w-full h-full bg-transparent transition-colors hover:bg-border">
298302
{haveServicesWithDomains ? (

0 commit comments

Comments
 (0)