The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
test-send → send-test
Steven Teyb2daba3619ce
diff --git a/apps/web/lib/actions/test-send-webhook.ts b/apps/web/lib/actions/send-test-webhook.tssimilarity index 95%rename from apps/web/lib/actions/test-send-webhook.tsrename to apps/web/lib/actions/send-test-webhook.tsindex 377e54bdc8..ac7315caf6 100644--- a/apps/web/lib/actions/test-send-webhook.ts+++ b/apps/web/lib/actions/send-test-webhook.ts@@ -15,7 +15,7 @@ const schema = z.object({});// Test send webhook event-export const testSendWebhookEvent = authActionClient+export const sendTestWebhookEvent = authActionClient.schema(schema).action(async ({ ctx, parsedInput }) => {const { workspace } = ctx;diff --git a/apps/web/ui/modals/test-send-webhook.tsx b/apps/web/ui/modals/send-test-webhook-modal.tsxsimilarity index 70%rename from apps/web/ui/modals/test-send-webhook.tsxrename to apps/web/ui/modals/send-test-webhook-modal.tsxindex be53d58f32..d54f17343e 100644--- a/apps/web/ui/modals/test-send-webhook.tsx+++ b/apps/web/ui/modals/send-test-webhook-modal.tsx@@ -1,4 +1,4 @@-import { testSendWebhookEvent } from "@/lib/actions/test-send-webhook";+import { sendTestWebhookEvent } from "@/lib/actions/send-test-webhook";import useWorkspace from "@/lib/swr/use-workspace";import { WebhookProps, WebhookTrigger } from "@/lib/types";import { WEBHOOK_TRIGGER_DESCRIPTIONS } from "@/lib/webhook/constants";@@ -19,23 +19,23 @@ import {} from "react";import { toast } from "sonner";-function TestSendWebhookModal({- showTestSendWebhookModal,- setShowTestSendWebhookModal,+function SendTestWebhookModal({+ showSendTestWebhookModal,+ setShowSendTestWebhookModal,webhook,}: {- showTestSendWebhookModal: boolean;- setShowTestSendWebhookModal: Dispatch<SetStateAction<boolean>>;+ showSendTestWebhookModal: boolean;+ setShowSendTestWebhookModal: Dispatch<SetStateAction<boolean>>;webhook: WebhookProps | undefined;}) {const workspace = useWorkspace();const [selectedTrigger, setSelectedTrigger] =useState<InputSelectItemProps | null>(null);- const { execute, isExecuting } = useAction(testSendWebhookEvent, {+ const { execute, isExecuting } = useAction(sendTestWebhookEvent, {onSuccess: () => {toast.success("Webhook event sent.");- setShowTestSendWebhookModal(false);+ setShowSendTestWebhookModal(false);},onError: ({ error }) => {toast.error(error.serverError?.serverError);@@ -51,8 +51,8 @@ function TestSendWebhookModal({return (<Modal- showModal={showTestSendWebhookModal}- setShowModal={setShowTestSendWebhookModal}+ showModal={showSendTestWebhookModal}+ setShowModal={setShowSendTestWebhookModal}><div className="flex flex-col items-center justify-center space-y-3 border-b border-gray-200 px-4 py-4 pt-8 text-center sm:px-16"><Logo />@@ -94,29 +94,29 @@ function TestSendWebhookModal({);}-export function useTestSendWebhookModal({+export function useSendTestWebhookModal({webhook,}: {webhook: WebhookProps | undefined;}) {- const [showTestSendWebhookModal, setShowTestSendWebhookModal] =+ const [showSendTestWebhookModal, setShowSendTestWebhookModal] =useState(false);- const TestSendWebhookModalCallback = useCallback(() => {+ const SendTestWebhookModalCallback = useCallback(() => {return (- <TestSendWebhookModal- showTestSendWebhookModal={showTestSendWebhookModal}- setShowTestSendWebhookModal={setShowTestSendWebhookModal}+ <SendTestWebhookModal+ showSendTestWebhookModal={showSendTestWebhookModal}+ setShowSendTestWebhookModal={setShowSendTestWebhookModal}webhook={webhook}/>);- }, [showTestSendWebhookModal, setShowTestSendWebhookModal]);+ }, [showSendTestWebhookModal, setShowSendTestWebhookModal]);return useMemo(() => ({- setShowTestSendWebhookModal,- TestSendWebhookModal: TestSendWebhookModalCallback,+ setShowSendTestWebhookModal,+ SendTestWebhookModal: SendTestWebhookModalCallback,}),- [setShowTestSendWebhookModal, TestSendWebhookModalCallback],+ [setShowSendTestWebhookModal, SendTestWebhookModalCallback],);}diff --git a/apps/web/ui/webhooks/webhook-header.tsx b/apps/web/ui/webhooks/webhook-header.tsxindex 828c710ffc..ad845d43d2 100644--- a/apps/web/ui/webhooks/webhook-header.tsx+++ b/apps/web/ui/webhooks/webhook-header.tsx@@ -12,7 +12,7 @@ import { notFound, useRouter } from "next/navigation";import { useState } from "react";import useSWR from "swr";import { useDeleteWebhookModal } from "../modals/delete-webhook-modal";-import { useTestSendWebhookModal } from "../modals/test-send-webhook";+import { useSendTestWebhookModal } from "../modals/send-test-webhook-modal";export default function WebhookHeader({webhookId,@@ -34,8 +34,8 @@ export default function WebhookHeader({webhook,});- const { TestSendWebhookModal, setShowTestSendWebhookModal } =- useTestSendWebhookModal({+ const { SendTestWebhookModal, setShowSendTestWebhookModal } =+ useSendTestWebhookModal({webhook,});@@ -51,7 +51,7 @@ export default function WebhookHeader({return (<><MaxWidthWrapper className="grid max-w-screen-lg gap-8">- <TestSendWebhookModal />+ <SendTestWebhookModal /><DeleteWebhookModal /><Linkhref={`/${slug}/settings/webhooks`}@@ -120,7 +120,7 @@ export default function WebhookHeader({icon={<Send className="h-4 w-4" />}className="h-9 justify-start px-2"onClick={() => {- setShowTestSendWebhookModal(true);+ setShowSendTestWebhookModal(true);}}/>