fix: multiple notifications for isolated compose and randomize compose

This commit is contained in:
Khiet Tam Nguyen
2025-05-18 15:07:05 +10:00
parent 7fe163dd33
commit 5dfa7645f3
2 changed files with 2 additions and 10 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(() => {
@@ -88,11 +88,7 @@ export const IsolatedDeployment = ({ composeId }: Props) => {
.then(async (data) => {
await utils.project.all.invalidate();
setCompose(data);
toast.success("Compose Isolated");
})
.catch(() => {
toast.error("Error isolating the compose");
});
};
return (

View File

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