Skip to content

Commit 91a4470

Browse files
authored
Merge pull request #1917 from nktnet1/fix-isolated-randomized-compose-notifs
fix: multiple notifications for isolated compose and randomize compose
2 parents 748de47 + 0f48f2c commit 91a4470

2 files changed

Lines changed: 10 additions & 20 deletions

File tree

apps/dokploy/components/dashboard/compose/general/isolated-deployment.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ export const IsolatedDeployment = ({ composeId }: Props) => {
7171
isolatedDeployment: formData?.isolatedDeployment || false,
7272
})
7373
.then(async (_data) => {
74-
randomizeCompose();
75-
refetch();
74+
await randomizeCompose();
75+
await refetch();
7676
toast.success("Compose updated");
7777
})
7878
.catch(() => {
@@ -84,15 +84,10 @@ export const IsolatedDeployment = ({ composeId }: Props) => {
8484
await mutateAsync({
8585
composeId,
8686
suffix: data?.appName || "",
87-
})
88-
.then(async (data) => {
89-
await utils.project.all.invalidate();
90-
setCompose(data);
91-
toast.success("Compose Isolated");
92-
})
93-
.catch(() => {
94-
toast.error("Error isolating the compose");
95-
});
87+
}).then(async (data) => {
88+
await utils.project.all.invalidate();
89+
setCompose(data);
90+
});
9691
};
9792

9893
return (

apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,10 @@ export const RandomizeCompose = ({ composeId }: Props) => {
9090
await mutateAsync({
9191
composeId,
9292
suffix,
93-
})
94-
.then(async (data) => {
95-
await utils.project.all.invalidate();
96-
setCompose(data);
97-
toast.success("Compose randomized");
98-
})
99-
.catch(() => {
100-
toast.error("Error randomizing the compose");
101-
});
93+
}).then(async (data) => {
94+
await utils.project.all.invalidate();
95+
setCompose(data);
96+
});
10297
};
10398

10499
return (

0 commit comments

Comments
 (0)