Skip to content

Commit

Permalink
fix(ui): Change Action field "name" to "title"
Browse files Browse the repository at this point in the history
  • Loading branch information
topher-lo committed Mar 4, 2024
1 parent 982281a commit 2281b41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/forms/action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})
Expand Down Expand Up @@ -70,7 +70,7 @@ export function ActionForm({ actionId }: ActionFormProps): React.JSX.Element {
const form = useForm<z.infer<typeof actionFormSchema>>({
resolver: zodResolver(actionFormSchema),
defaultValues: {
name: "", // Default value for name
title: "", // Default value for name
description: "", // Default value for description
},
});
Expand All @@ -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);
Expand Down Expand Up @@ -151,7 +151,7 @@ export function ActionForm({ actionId }: ActionFormProps): React.JSX.Element {
<div className="space-y-4 mb-4">
<FormField
control={form.control}
name="name"
name="title"
render={({ field }: { field: any }) => (
<FormItem>
<FormLabel>Name</FormLabel>
Expand Down

0 comments on commit 2281b41

Please sign in to comment.