Skip to content

Commit 18965a4

Browse files
committed
Hide preview & branding in the text version
I don't even know how to view those TBH
1 parent 695a9c3 commit 18965a4

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/core/email/templates/base.tsx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Divider,
88
Font,
99
Head,
10+
HideInText,
1011
Image,
1112
InText,
1213
Mjml,
@@ -39,13 +40,15 @@ export const EmailTemplate = ({
3940
<Head>
4041
<Title>{title}</Title>
4142
{preview != null && (
42-
<Preview>
43-
{preview}
44-
{/* Fill the remaining space with nothing-ness so the email context is avoided */}
45-
{[...Array(140).keys()].map((i) => (
46-
<Fragment key={i}>&#847;&zwnj;&nbsp;</Fragment>
47-
))}
48-
</Preview>
43+
<HideInText>
44+
<Preview>
45+
{preview}
46+
{/* Fill the remaining space with nothing-ness so the email context is avoided */}
47+
{[...Array(140).keys()].map((i) => (
48+
<Fragment key={i}>&#847;&zwnj;&nbsp;</Fragment>
49+
))}
50+
</Preview>
51+
</HideInText>
4952
)}
5053
<Theme />
5154
<Style
@@ -71,7 +74,9 @@ export const EmailTemplate = ({
7174
/>
7275
</Head>
7376
<Body>
74-
<Branding />
77+
<HideInText>
78+
<Branding />
79+
</HideInText>
7580

7681
<Wrapper
7782
cssClass="card-shadow"

0 commit comments

Comments
 (0)