mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: update ConnectorForm UI
This commit is contained in:
@@ -1,28 +1,17 @@
|
||||
import type {FormInstance} from 'antd'
|
||||
import {Alert, Form, Input, Typography} from 'antd'
|
||||
import React from 'react'
|
||||
import type {Connector} from '../../api/connectors'
|
||||
import {ConnectorProvider} from '../../api/connectors'
|
||||
import {t} from 'ttag'
|
||||
import DefaultConnectorFormItems from "./DefaultConnectorFormItems"
|
||||
import {formItemLayoutWithOutLabel, providersConfig} from "../index"
|
||||
|
||||
export default function NamecomConnectorForm({form, onCreate}: {
|
||||
form: FormInstance,
|
||||
onCreate: (values: Connector) => void
|
||||
export default function NamecomConnectorForm({form}: {
|
||||
form: FormInstance
|
||||
}) {
|
||||
|
||||
form.setFieldValue('provider', ConnectorProvider["Name.com"])
|
||||
|
||||
return (
|
||||
<Form
|
||||
{...formItemLayoutWithOutLabel}
|
||||
form={form}
|
||||
layout='horizontal'
|
||||
labelCol={{span: 6}}
|
||||
wrapperCol={{span: 14}}
|
||||
onFinish={onCreate}
|
||||
>
|
||||
<>
|
||||
<Alert
|
||||
message={t`This provider does not provide a list of supported TLD. Please double check if the domain you want to register is supported.`}
|
||||
type='warning'
|
||||
@@ -43,7 +32,6 @@ export default function NamecomConnectorForm({form, onCreate}: {
|
||||
>
|
||||
<Input autoComplete='off'/>
|
||||
</Form.Item>
|
||||
<DefaultConnectorFormItems tosLink={providersConfig[ConnectorProvider["Name.com"]].tosLink}/>
|
||||
</Form>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user