mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-10 22:49:51 +00:00
24 lines
793 B
TypeScript
24 lines
793 B
TypeScript
import { useTranslation } from "react-i18next";
|
|
import { Form, Input } from "antd";
|
|
import { createSchemaFieldRule } from "antd-zod";
|
|
import { z } from "zod";
|
|
|
|
const NotifyChannelEditFormWebhookFields = () => {
|
|
const { t } = useTranslation();
|
|
|
|
const formSchema = z.object({
|
|
url: z.string({ message: t("settings.notification.channel.form.webhook_url.placeholder") }).url(t("common.errmsg.url_invalid")),
|
|
});
|
|
const formRule = createSchemaFieldRule(formSchema);
|
|
|
|
return (
|
|
<div>
|
|
<Form.Item name="url" label={t("settings.notification.channel.form.webhook_url.label")} rules={[formRule]}>
|
|
<Input placeholder={t("settings.notification.channel.form.webhook_url.placeholder")} />
|
|
</Form.Item>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default NotifyChannelEditFormWebhookFields;
|