Scheduling infrastructure for absolutely everyone.
fix: initialize useCustomTemplate state based on payloadTemplate prop… (#18257)
Akash Jayanf7f36978e136
diff --git a/packages/features/webhooks/components/WebhookForm.tsx b/packages/features/webhooks/components/WebhookForm.tsxindex b9f47aa344c..59e066e5977 100644--- a/packages/features/webhooks/components/WebhookForm.tsx+++ b/packages/features/webhooks/components/WebhookForm.tsx@@ -121,7 +121,9 @@ const WebhookForm = (props: {},});- const [useCustomTemplate, setUseCustomTemplate] = useState(false);+ const [useCustomTemplate, setUseCustomTemplate] = useState(+ props?.webhook?.payloadTemplate !== undefined && props?.webhook?.payloadTemplate !== null+ );const [newSecret, setNewSecret] = useState("");const [changeSecret, setChangeSecret] = useState<boolean>(false);const hasSecretKey = !!props?.webhook?.secret;