| 159 | }; |
| 160 | |
| 161 | const handleCopyUrl = async (webhook: WebhookConfiguration) => { |
| 162 | const url = `${WEBHOOK_BASE_URL}/webhooks/inbound/${webhook.webhookPath}`; |
| 163 | try { |
| 164 | await navigator.clipboard.writeText(url); |
| 165 | toast({ |
| 166 | title: 'Webhook URL copied', |
| 167 | description: 'The webhook URL has been copied to your clipboard.', |
| 168 | }); |
| 169 | } catch (_err) { |
| 170 | toast({ |
| 171 | title: 'Failed to copy', |
| 172 | description: 'Could not copy the webhook URL to clipboard.', |
| 173 | variant: 'destructive', |
| 174 | }); |
| 175 | } |
| 176 | }; |
| 177 | |
| 178 | const handleRefresh = async () => { |
| 179 | try { |