have footer on emails (#11300)
# ISSUE - Closes #9622 --------- Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
co-authored by
Félix Malfait
parent
cfae440a02
commit
7eec64b6e0
@@ -1,7 +1,5 @@
|
||||
import { i18n } from '@lingui/core';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
|
||||
import { Trans } from '@lingui/react';
|
||||
import { BaseEmail } from 'src/components/BaseEmail';
|
||||
import { CallToAction } from 'src/components/CallToAction';
|
||||
import { MainText } from 'src/components/MainText';
|
||||
@@ -21,29 +19,38 @@ export const PasswordUpdateNotifyEmail = ({
|
||||
link,
|
||||
locale,
|
||||
}: PasswordUpdateNotifyEmailProps) => {
|
||||
const helloString = userName?.length > 1 ? t`Dear ${userName}` : t`Hello`;
|
||||
const formattedDate = i18n.date(new Date());
|
||||
|
||||
return (
|
||||
<BaseEmail locale={locale}>
|
||||
<Title value={<Trans>Password updated</Trans>} />
|
||||
<Title value={i18n._('Password updated')} />
|
||||
<MainText>
|
||||
{helloString},
|
||||
{userName?.length > 1 ? (
|
||||
<Trans id="Dear {userName}," values={{ userName }} />
|
||||
) : (
|
||||
<Trans id="Hello," />
|
||||
)}
|
||||
<br />
|
||||
<br />
|
||||
<Trans>
|
||||
This is a confirmation that password for your account ({email}) was
|
||||
successfully changed on {formattedDate}.
|
||||
</Trans>
|
||||
<Trans
|
||||
id="This is a confirmation that password for your account ({email}) was successfully changed on {formattedDate}."
|
||||
values={{ email, formattedDate }}
|
||||
/>
|
||||
<br />
|
||||
<br />
|
||||
<Trans>
|
||||
If you did not initiate this change, please contact your workspace
|
||||
owner immediately.
|
||||
</Trans>
|
||||
<Trans id="If you did not initiate this change, please contact your workspace owner immediately." />
|
||||
<br />
|
||||
</MainText>
|
||||
<CallToAction value={<Trans>Connect to Twenty</Trans>} href={link} />
|
||||
<CallToAction value={i18n._('Connect to Twenty')} href={link} />
|
||||
</BaseEmail>
|
||||
);
|
||||
};
|
||||
|
||||
PasswordUpdateNotifyEmail.PreviewProps = {
|
||||
userName: 'John Doe',
|
||||
email: 'john.doe@example.com',
|
||||
link: 'https://app.twenty.com',
|
||||
locale: 'en',
|
||||
} as PasswordUpdateNotifyEmailProps;
|
||||
|
||||
export default PasswordUpdateNotifyEmail;
|
||||
|
||||
Reference in New Issue
Block a user