mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-25 17:15:22 +02:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -80,14 +80,18 @@ export const DuplicateProject = ({
|
||||
api.project.duplicate.useMutation({
|
||||
onSuccess: async (newProject) => {
|
||||
await utils.project.all.invalidate();
|
||||
|
||||
|
||||
// If duplicating to same project+environment, invalidate the environment query
|
||||
// to refresh the services list
|
||||
if (duplicateType === "existing-environment") {
|
||||
await utils.environment.one.invalidate({ environmentId: selectedTargetEnvironment });
|
||||
await utils.environment.byProjectId.invalidate({ projectId: selectedTargetProject });
|
||||
|
||||
// If duplicating to the same environment we're currently viewing,
|
||||
await utils.environment.one.invalidate({
|
||||
environmentId: selectedTargetEnvironment,
|
||||
});
|
||||
await utils.environment.byProjectId.invalidate({
|
||||
projectId: selectedTargetProject,
|
||||
});
|
||||
|
||||
// If duplicating to the same environment we're currently viewing,
|
||||
// also invalidate the current environment to refresh the services list
|
||||
if (selectedTargetEnvironment === environmentId) {
|
||||
await utils.environment.one.invalidate({ environmentId });
|
||||
@@ -98,7 +102,7 @@ export const DuplicateProject = ({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
toast.success(
|
||||
duplicateType === "new-project"
|
||||
? "Project duplicated successfully"
|
||||
@@ -347,4 +351,4 @@ export const DuplicateProject = ({
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user