From b381f9b4ff8ea420b4790e4fed4eabb9b8be56e9 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 21 Dec 2024 11:37:55 +0800 Subject: [PATCH] tsc --- server/emails/templates/ConfirmUpdateEmail.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/emails/templates/ConfirmUpdateEmail.tsx b/server/emails/templates/ConfirmUpdateEmail.tsx index e50d97bf35..05b903513b 100644 --- a/server/emails/templates/ConfirmUpdateEmail.tsx +++ b/server/emails/templates/ConfirmUpdateEmail.tsx @@ -11,7 +11,7 @@ import Heading from "./components/Heading"; type Props = EmailProps & { code: string; - previous: string; + previous: string | null; teamUrl: string; }; @@ -34,7 +34,9 @@ export default class ConfirmUpdateEmail extends BaseEmail { protected renderAsText({ teamUrl, code, previous, to }: Props): string { return ` You requested to update your ${env.APP_NAME} account email. Please -follow the link below to confirm the change from ${previous} to ${to}. +follow the link below to confirm the change ${ + previous ? `from ${previous} ` : "" + }to ${to}. ${this.updateLink(teamUrl, code)} `; @@ -49,8 +51,8 @@ follow the link below to confirm the change from ${previous} to ${to}. Your email update request

You requested to update your {env.APP_NAME} account email. Please - click below to confirm the change from {previous} to{" "} - {to}. + click below to confirm the change{" "} + {previous ? `from ${previous} ` : ""}to {to}.