Feat: webhook form UX improvement (#6448)
* feat: add type and required attribute * feat: disable ping button when subscriberUrl is not present Co-authored-by: Leo Giovanetti <[email protected]>
This commit is contained in:
1 parent
d0d8878f34
commit
e2258fba27
2 files changed
+3
-1
No files matched your search
@@ -96,6 +96,8 @@ const WebhookForm = (props: {
|
||||
label={t("subscriber_url")}
|
||||
labelClassName="font-medium text-gray-900 font-sm"
|
||||
value={value}
|
||||
required
|
||||
type="url"
|
||||
onChange={(e) => {
|
||||
formMethods.setValue("subscriberUrl", e?.target.value);
|
||||
if (hasTemplateIntegration({ url: e.target.value })) {
|
||||
|
||||
@@ -28,7 +28,7 @@ export default function WebhookTestDisclosure() {
|
||||
<Button
|
||||
type="button"
|
||||
color="secondary"
|
||||
disabled={mutation.isLoading}
|
||||
disabled={mutation.isLoading || !subscriberUrl}
|
||||
StartIcon={Icon.FiActivity}
|
||||
onClick={() => mutation.mutate({ url: subscriberUrl, type: "PING", payloadTemplate })}>
|
||||
{t("ping_test")}
|
||||
|
||||
Reference in new issue
Block a user