mirror of
https://github.com/documenso/documenso.git
synced 2026-06-22 04:12:06 +10:00
76 lines
2.2 KiB
TypeScript
76 lines
2.2 KiB
TypeScript
import { Trans } from '@lingui/react/macro';
|
|
|
|
import { Link, Section, Text } from '../components';
|
|
import { useBranding } from '../providers/branding';
|
|
import { getSafeBrandingUrl } from '../utils/branding-url';
|
|
|
|
export type TemplateFooterProps = {
|
|
isDocument?: boolean;
|
|
reportUrl?: string;
|
|
};
|
|
|
|
export const TemplateFooter = ({ isDocument = true, reportUrl }: TemplateFooterProps) => {
|
|
const branding = useBranding();
|
|
|
|
const safeBrandingUrl = branding.brandingEnabled ? getSafeBrandingUrl(branding.brandingUrl) : null;
|
|
|
|
return (
|
|
<Section>
|
|
{reportUrl && (
|
|
<Text className="my-4 text-base text-slate-400">
|
|
<Trans>
|
|
Did not expect this email?{' '}
|
|
<Link className="text-[#7AC455]" href={reportUrl}>
|
|
Click here to report the sender
|
|
</Link>
|
|
. Never sign a document you don't recognize or weren't expecting.
|
|
</Trans>
|
|
</Text>
|
|
)}
|
|
|
|
{isDocument && !branding.brandingHidePoweredBy && (
|
|
<Text className="my-4 text-base text-slate-400">
|
|
<Trans>
|
|
This document was sent using{' '}
|
|
<Link className="text-[#7AC455]" href="https://documen.so/mail-footer">
|
|
Documenso
|
|
</Link>
|
|
.
|
|
</Trans>
|
|
</Text>
|
|
)}
|
|
|
|
{branding.brandingEnabled && branding.brandingCompanyDetails && (
|
|
<Text className="my-8 text-slate-400 text-sm">
|
|
{branding.brandingCompanyDetails.split('\n').map((line, idx) => {
|
|
return (
|
|
<>
|
|
{idx > 0 && <br />}
|
|
{line}
|
|
</>
|
|
);
|
|
})}
|
|
</Text>
|
|
)}
|
|
|
|
{branding.brandingEnabled && safeBrandingUrl && (
|
|
<Text className="my-8 text-slate-400 text-sm">
|
|
<Link href={safeBrandingUrl} target="_blank">
|
|
{safeBrandingUrl}
|
|
</Link>
|
|
</Text>
|
|
)}
|
|
|
|
{!branding.brandingEnabled && (
|
|
<Text className="my-8 text-slate-400 text-sm">
|
|
Documenso, Inc.
|
|
<br />
|
|
2261 Market Street, #5211, San Francisco, CA 94114, USA
|
|
</Text>
|
|
)}
|
|
</Section>
|
|
);
|
|
};
|
|
|
|
export default TemplateFooter;
|