import { Plus, Trash } from 'lucide-react' import { useFieldArray } from 'react-hook-form' import { Button, FormControl_Shadcn_, FormField_Shadcn_, FormItem_Shadcn_, FormMessage_Shadcn_, Input_Shadcn_, SheetSection, } from 'ui' import { CreateCronJobForm } from './CreateCronJobSheet' interface HTTPParameterFieldsSectionProps { variant: 'edge_function' | 'http_request' } export const HTTPParameterFieldsSection = ({ variant }: HTTPParameterFieldsSectionProps) => { // gets the fields through form context const { fields, append, remove } = useFieldArray({ name: 'values.httpParameters', }) return ( HTTP Parameters
{fields.map((field, index) => (
( )} /> ( )} />
))}
) }