Merge pull request #1917 from nktnet1/fix-isolated-randomized-compose-notifs

fix: multiple notifications for isolated compose and randomize compose
This commit is contained in:
Mauricio Siu
2025-05-18 02:19:51 -06:00
committed by GitHub
2 changed files with 10 additions and 20 deletions

View File

@@ -71,8 +71,8 @@ export const IsolatedDeployment = ({ composeId }: Props) => {
isolatedDeployment: formData?.isolatedDeployment || false,
})
.then(async (_data) => {
randomizeCompose();
refetch();
await randomizeCompose();
await refetch();
toast.success("Compose updated");
})
.catch(() => {
@@ -84,15 +84,10 @@ export const IsolatedDeployment = ({ composeId }: Props) => {
await mutateAsync({
composeId,
suffix: data?.appName || "",
})
.then(async (data) => {
await utils.project.all.invalidate();
setCompose(data);
toast.success("Compose Isolated");
})
.catch(() => {
toast.error("Error isolating the compose");
});
}).then(async (data) => {
await utils.project.all.invalidate();
setCompose(data);
});
};
return (

View File

@@ -90,15 +90,10 @@ export const RandomizeCompose = ({ composeId }: Props) => {
await mutateAsync({
composeId,
suffix,
})
.then(async (data) => {
await utils.project.all.invalidate();
setCompose(data);
toast.success("Compose randomized");
})
.catch(() => {
toast.error("Error randomizing the compose");
});
}).then(async (data) => {
await utils.project.all.invalidate();
setCompose(data);
});
};
return (