Refactor: Move service type selection
This commit is contained in:
@@ -10,44 +10,21 @@ interface ServiceBasicFieldsProps {
|
|||||||
|
|
||||||
export function ServiceBasicFields({ form }: ServiceBasicFieldsProps) {
|
export function ServiceBasicFields({ form }: ServiceBasicFieldsProps) {
|
||||||
return (
|
return (
|
||||||
<>
|
<FormField
|
||||||
<FormField
|
control={form.control}
|
||||||
control={form.control}
|
name="name"
|
||||||
name="name"
|
render={({ field }) => (
|
||||||
render={({ field }) => (
|
<FormItem>
|
||||||
<FormItem>
|
<FormLabel>Service Name</FormLabel>
|
||||||
<FormLabel>Service Name</FormLabel>
|
<FormControl>
|
||||||
<FormControl>
|
<Input
|
||||||
<Input
|
placeholder="Enter a descriptive name for your service"
|
||||||
placeholder="Service Name"
|
{...field}
|
||||||
{...field}
|
/>
|
||||||
/>
|
</FormControl>
|
||||||
</FormControl>
|
<FormMessage />
|
||||||
<FormMessage />
|
</FormItem>
|
||||||
</FormItem>
|
)}
|
||||||
)}
|
/>
|
||||||
/>
|
|
||||||
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="url"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem>
|
|
||||||
<FormLabel>Service URL</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Input
|
|
||||||
placeholder="https://example.com"
|
|
||||||
{...field}
|
|
||||||
onChange={(e) => {
|
|
||||||
console.log("URL field changed:", e.target.value);
|
|
||||||
field.onChange(e);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user