| 1 | import { Text } from '@react-email/components'; |
| 2 | |
| 3 | import { |
| 4 | ActionButton, |
| 5 | EmailLayout, |
| 6 | LinkFallback, |
| 7 | text, |
| 8 | } from '../components/layout.js'; |
| 9 | |
| 10 | interface WebhookDisabledProps { |
| 11 | name?: string |
| 12 | owner: string; |
| 13 | url: string; |
| 14 | reason: string; |
| 15 | settingsUrl: string; |
| 16 | appUrl: string; |
| 17 | } |
| 18 | |
| 19 | export default function WebhookDisabled |
| 20 | name = 'there' |
| 21 | owner = 'alice/ghost' |
| 22 | url = 'https://example.com/webhook' |
| 23 | reason = 'Every delivery failed for three days.' |
| 24 | settingsUrl = 'http://localhost:3000/alice/ghost/settings/webhooks/whk_1' |
| 25 | appUrl = 'http://localhost:3000' |
| 26 | }: WebhookDisabledProps) |
| 27 | return ( |
| 28 | <EmailLayout |
| 29 | appUrl={appUrl} |
| 30 | heading="A webhook was turned off" |
| 31 | preview={`Ghost stopped sending deliveries to ${url |
| 32 | > |
| 33 | <Text style={ |
| 34 | Hi <span style={text |
| 35 | on <span style={text |
| 36 | <span style={text |
| 37 | </Text> |
| 38 | <ActionButton href={ |
| 39 | <LinkFallback href={ |
| 40 | <Text style={ |
| 41 | The delivery log shows what the endpoint answered. Once it is fixed, |
| 42 | turn the webhook back on and redeliver anything it missed. |
| 43 | </Text> |
| 44 | </EmailLayout> |
| 45 | ); |
| 46 | } |