fix: phone number in confirmation email (#18642)

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
Udit Takkar
2025-01-14 16:27:24 +00:00
committed by GitHub
co-authored by Peer Richelsen
parent 2aa3d1d4e0
commit 30180edc0b
2 changed files with 17 additions and 14 deletions
+17 -12
View File
@@ -5,18 +5,23 @@ import type { CalendarEvent } from "@calcom/types/Calendar";
import { Info } from "./Info";
export const PersonInfo = ({ name = "", email = "", role = "", phoneNumber = "" }) => (
<div style={{ color: "#101010", fontWeight: 400, lineHeight: "24px" }}>
{name} - {role} {phoneNumber}
{!isSmsCalEmail(email) && (
<span style={{ color: "#4B5563" }}>
<a href={`mailto:${email}`} style={{ color: "#4B5563" }}>
{email}
</a>
</span>
)}
</div>
);
export const PersonInfo = ({ name = "", email = "", role = "", phoneNumber = "" }) => {
const displayEmail = !isSmsCalEmail(email);
const formattedPhoneNumber = !!phoneNumber ? `${phoneNumber} ` : "";
return (
<div style={{ color: "#101010", fontWeight: 400, lineHeight: "24px" }}>
{name} - {role} {formattedPhoneNumber}
{displayEmail && (
<span style={{ color: "#4B5563" }}>
<a href={`mailto:${email}`} style={{ color: "#4B5563" }}>
{email}
</a>
</span>
)}
</div>
);
};
export function WhoInfo(props: { calEvent: CalendarEvent; t: TFunction }) {
const { t } = props;
-2
View File
@@ -55,10 +55,8 @@ export const getWho = (
return `
${attendee?.name || t("guest")}
${!isSmsCalEmail(attendee.email) ? `${attendee.email}\n` : `${attendee.phoneNumber}\n`}
`;
})
.join("");
const organizer = `