import { useWatch } from "react-hook-form"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Badge, Button, Icon, showToast } from "@calcom/ui"; export default function WebhookTestDisclosure() { const subscriberUrl: string = useWatch({ name: "subscriberUrl" }); const payloadTemplate = useWatch({ name: "payloadTemplate" }) || null; const { t } = useLocale(); const mutation = trpc.viewer.webhook.testTrigger.useMutation({ onError(err) { showToast(err.message, "error"); }, }); return (