import * as React from "react"; import { Body, Button, Container, Head, Heading, Hr, Html, Img, Preview, Section, Tailwind, Text, } from "@react-email/components"; interface CommentMentionEmailTemplateProps { mentionedUserName: string; mentionedUserEmail: string; authorName?: string; // Optional - undefined if author deleted or not project member projectName: string; commentPreview: string; commentLink: string; settingsLink: string; } export const CommentMentionEmailTemplate = ({ mentionedUserName, mentionedUserEmail, authorName, projectName, commentPreview, commentLink, settingsLink, }: CommentMentionEmailTemplateProps) => { const previewText = authorName ? `${authorName} mentioned you in ${projectName}` : `You were mentioned in a comment in ${projectName}`; // Split by newlines and render with line breaks const commentLines = commentPreview.split("\n"); return ( {previewText}
Langfuse
{authorName ? `${authorName} mentioned you` : "You were mentioned in a comment"} Hello {mentionedUserName} {authorName ? ( <> {authorName} mentioned you in a comment in{" "} {projectName}: ) : ( <> You were mentioned in a comment in{" "} {projectName}: )}
{commentLines.map((line, index) => ( {line} {index < commentLines.length - 1 &&
}
))}

This email was sent to{" "} {mentionedUserEmail}. You can{" "} manage your notification preferences {" "} in your project settings.
); }; export default CommentMentionEmailTemplate;