2025-12-28 18:20:15 +01:00
|
|
|
import { FormProvider } from 'react-hook-form';
|
|
|
|
|
import ConnectionSection from './sections/ConnectionSection';
|
|
|
|
|
import BasicInfoSection from './sections/BasicInfoSection';
|
|
|
|
|
import TransportSection from './sections/TransportSection';
|
|
|
|
|
import AuthSection from './sections/AuthSection';
|
|
|
|
|
import TrustSection from './sections/TrustSection';
|
|
|
|
|
import type { useMCPServerForm } from './hooks/useMCPServerForm';
|
|
|
|
|
|
|
|
|
|
interface MCPServerFormProps {
|
|
|
|
|
formHook: ReturnType<typeof useMCPServerForm>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default function MCPServerForm({ formHook }: MCPServerFormProps) {
|
|
|
|
|
const { methods, isEditMode, server } = formHook;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<FormProvider {...methods}>
|
2026-01-05 19:46:35 +01:00
|
|
|
<div className="space-y-4 px-1 py-1">
|
2025-12-28 18:20:15 +01:00
|
|
|
<BasicInfoSection />
|
|
|
|
|
|
|
|
|
|
<ConnectionSection />
|
|
|
|
|
|
|
|
|
|
<TransportSection />
|
|
|
|
|
|
|
|
|
|
<AuthSection isEditMode={isEditMode} serverName={server?.serverName} />
|
|
|
|
|
|
|
|
|
|
<TrustSection />
|
|
|
|
|
</div>
|
|
|
|
|
</FormProvider>
|
|
|
|
|
);
|
|
|
|
|
}
|