diff --git a/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx b/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx index e57f21895..a7c5f7288 100644 --- a/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx +++ b/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx @@ -66,19 +66,13 @@ export const AddCommand = ({ applicationId }: Props) => { }); useEffect(() => { - if (data?.command) { + if (data) { form.reset({ command: data?.command || "", args: data?.args?.map((arg) => ({ value: arg })) || [], }); } - }, [ - form, - form.reset, - form.formState.isSubmitSuccessful, - data?.command, - data?.args, - ]); + }, [data, form]); const onSubmit = async (data: AddCommand) => { await mutateAsync({ diff --git a/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx b/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx index 934716b19..5a543b477 100644 --- a/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx +++ b/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx @@ -87,7 +87,7 @@ export const ShowCustomCommand = ({ id, type }: Props) => { args: data.args?.map((arg) => ({ value: arg })) || [], }); } - }, [data, form, form.reset]); + }, [data, form]); const onSubmit = async (formData: AddDockerImage) => { await mutateAsync({