From 2281b41071367fa7da86577148aeb3c1cad9bfb0 Mon Sep 17 00:00:00 2001 From: Christopher Lo <46541035+topher-lo@users.noreply.github.com> Date: Mon, 4 Mar 2024 20:46:22 +0000 Subject: [PATCH] fix(ui): Change Action field "name" to "title" --- frontend/src/components/forms/action.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/forms/action.tsx b/frontend/src/components/forms/action.tsx index 579b21f51..79bf9f55c 100644 --- a/frontend/src/components/forms/action.tsx +++ b/frontend/src/components/forms/action.tsx @@ -28,7 +28,7 @@ import { CircleIcon, Save } from "lucide-react" // Define formSchema for type safety const actionFormSchema = z.object({ - name: z.string(), + title: z.string(), description: z.string(), inputs: z.string().optional(), }) @@ -70,7 +70,7 @@ export function ActionForm({ actionId }: ActionFormProps): React.JSX.Element { const form = useForm>({ resolver: zodResolver(actionFormSchema), defaultValues: { - name: "", // Default value for name + title: "", // Default value for name description: "", // Default value for description }, }); @@ -79,7 +79,7 @@ export function ActionForm({ actionId }: ActionFormProps): React.JSX.Element { if (data) { const { title, description, status } = data; form.reset({ // Use reset method to set form values - name: title, + title: title, description: description, }); setStatus(status); @@ -151,7 +151,7 @@ export function ActionForm({ actionId }: ActionFormProps): React.JSX.Element {
( Name