import { msg } from '@lingui/core/macro'; import { useLingui } from '@lingui/react'; import { Body, Container, Head, Html, Img, Preview, Section } from '../components'; import { useBranding } from '../providers/branding'; import { TemplateDocumentRejected } from '../template-components/template-document-rejected'; import { TemplateFooter } from '../template-components/template-footer'; type DocumentRejectedEmailProps = { recipientName: string; documentName: string; documentUrl: string; rejectionReason: string; assetBaseUrl?: string; }; export function DocumentRejectedEmail({ recipientName, documentName, documentUrl, rejectionReason, assetBaseUrl = 'http://localhost:3002', }: DocumentRejectedEmailProps) { const { _ } = useLingui(); const branding = useBranding(); const previewText = _(msg`${recipientName} has rejected the document '${documentName}'`); const getAssetUrl = (path: string) => { return new URL(path, assetBaseUrl).toString(); }; return (
)}