mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-03 04:55:23 +02:00
refactor(multi-server): replace executeCommand with execAsyncRemote
This commit is contained in:
@@ -34,16 +34,12 @@ const AddProjectSchema = z.object({
|
||||
message: "Name is required",
|
||||
}),
|
||||
description: z.string().optional(),
|
||||
serverId: z.string().min(1, {
|
||||
message: "Server is required",
|
||||
}),
|
||||
});
|
||||
|
||||
type AddProject = z.infer<typeof AddProjectSchema>;
|
||||
|
||||
export const AddProject = () => {
|
||||
const utils = api.useUtils();
|
||||
const { data: servers } = api.server.all.useQuery();
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const { mutateAsync, error, isError } = api.project.create.useMutation();
|
||||
const router = useRouter();
|
||||
@@ -51,7 +47,6 @@ export const AddProject = () => {
|
||||
defaultValues: {
|
||||
description: "",
|
||||
name: "",
|
||||
serverId: "",
|
||||
},
|
||||
resolver: zodResolver(AddProjectSchema),
|
||||
});
|
||||
@@ -60,7 +55,6 @@ export const AddProject = () => {
|
||||
form.reset({
|
||||
description: "",
|
||||
name: "",
|
||||
serverId: "",
|
||||
});
|
||||
}, [form, form.reset, form.formState.isSubmitSuccessful]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user