'use client'; import { Zap } from 'lucide-react'; import { Button } from '@documenso/ui/primitives/button'; import { SettingsHeader } from '~/components/(dashboard)/settings/layout/header'; import { CreateWebhookDialog } from '~/components/(dashboard)/settings/webhooks/create-webhook-dialog'; import { DeleteWebhookDialog } from '~/components/(dashboard)/settings/webhooks/delete-webhook-dialog'; export default function WebhookPage() { // TODO: Fetch webhooks from the DB after implementing the backend const webhooks = [ { id: 1, secret: 'my-secret', webhookUrl: 'https://example.com/webhook', eventTriggers: ['document.created', 'document.signed'], enabled: true, userID: 1, }, ]; return (
{webhooks.length === 0 && ( // TODO: Perhaps add some illustrations here to make the page more engaging

You have no webhooks yet. Your webhooks will be shown here once you create them.

)} {webhooks.length > 0 && (
{webhooks.map((webhook) => (

Webhook URL

{webhook.webhookUrl}

Event triggers

{webhook.eventTriggers.map((trigger, index) => (

{trigger}

))}
))}
)}
); }