Don't set inner HTML for text email content.

It was a bad copy-paste from the HTML display.
This commit is contained in:
Eli Ribble 2024-08-29 11:49:04 -07:00
parent 64d4e98996
commit 895bb8ae47
1 changed files with 7 additions and 14 deletions

View File

@ -15,20 +15,13 @@ const EmailContentText: React.FC<EmailContentTextProps> = (props) => {
}
return (
<Stack>
<pre>
{email.textBody.map((t) =>
t.partId === undefined ? (
<Placeholder />
) : (
<div
key={t.partId}
dangerouslySetInnerHTML={{
__html: email.bodyValues![t.partId].value,
}}
/>
),
)}
</pre>
{email.textBody.map((t) =>
t.partId === undefined ? (
<pre>undefined partId</pre>
) : (
<pre key={t.partId}>{email.bodyValues![t.partId].value}</pre>
),
)}
</Stack>
);
};