Skip to content

Commit 3aeb528

Browse files
committed
fix: missing switch env for apps
1 parent 3e356e6 commit 3aeb528

File tree

1 file changed

+11
-2
lines changed
  • apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/application

1 file changed

+11
-2
lines changed

apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/application/[applicationId].tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,27 @@ const Service = (
9191
const { data: isCloud } = api.settings.isCloud.useQuery();
9292
const { data: auth } = api.user.get.useQuery();
9393

94+
const { data: environments } = api.environment.byProjectId.useQuery({
95+
projectId: data?.environment?.project?.projectId || "",
96+
});
97+
const environmentDropdownItems =
98+
environments?.map((env) => ({
99+
name: env.name,
100+
href: `/dashboard/project/${projectId}/environment/${env.environmentId}`,
101+
})) || [];
102+
94103
return (
95104
<div className="pb-10">
96105
<UseKeyboardNav forPage="application" />
97106
<BreadcrumbSidebar
98107
list={[
99108
{ name: "Projects", href: "/dashboard/projects" },
100109
{
101-
name: data?.environment.project.name || "",
110+
name: data?.environment?.project?.name || "",
102111
},
103112
{
104113
name: data?.environment?.name || "",
105-
href: `/dashboard/project/${projectId}/environment/${environmentId}`,
114+
dropdownItems: environmentDropdownItems,
106115
},
107116
{
108117
name: data?.name || "",

0 commit comments

Comments
 (0)