Skip to content

Commit 1f4ae79

Browse files
cpennedgabrielmfern
authored andcommitted
fix(demo): address linter feedback for "receipts" emails (#1995)
1 parent 521853d commit 1f4ae79

File tree

2 files changed

+26
-46
lines changed

2 files changed

+26
-46
lines changed

apps/demo/emails/receipts/apple-receipt.tsx

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const AppleReceiptEmail = () => (
4444
<Text style={cupomText}>
4545
Save 3% on all your Apple purchases with Apple Card.
4646
<sup style={supStyle}>1</sup>{' '}
47-
<Link href="https://www.apple.com/apple-card">
47+
<Link href="https://www.apple.com/apple-card/">
4848
Apply and use in minutes
4949
</Link>
5050
<sup style={supStyle}>2</sup>
@@ -126,19 +126,11 @@ export const AppleReceiptEmail = () => (
126126
<Text style={productTitle}>HBO Max: Stream TV &amp; Movies</Text>
127127
<Text style={productDescription}>HBO Max Ad-Free (Monthly)</Text>
128128
<Text style={productDescription}>Renews Aug 20, 2023</Text>
129-
<Link
130-
href="https://userpub.itunes.apple.com/WebObjects/MZUserPublishing.woa/wa/addUserReview?cc=us&amp;id=1497977514&amp;o=i&amp;type=Subscription%20Renewal"
131-
style={productLink}
132-
data-saferedirecturl="https://www.google.com/url?q=https://userpub.itunes.apple.com/WebObjects/MZUserPublishing.woa/wa/addUserReview?cc%3Dus%26id%3D1497977514%26o%3Di%26type%3DSubscription%2520Renewal&amp;source=gmail&amp;ust=1673963081204000&amp;usg=AOvVaw2DFCLKMo1snS-Swk5H26Z1"
133-
>
129+
<Link href="https://www.apple.com/" style={productLink}>
134130
Write a Review
135131
</Link>
136132
<span style={divisor}>|</span>
137-
<Link
138-
href="https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/reportAProblem?a=1497977514&amp;cc=us&amp;d=683263808&amp;o=i&amp;p=29065684906671&amp;pli=29092219632071&amp;s=1"
139-
style={productLink}
140-
data-saferedirecturl="https://www.google.com/url?q=https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/reportAProblem?a%3D1497977514%26cc%3Dus%26d%3D683263808%26o%3Di%26p%3D29065684906671%26pli%3D29092219632071%26s%3D1&amp;source=gmail&amp;ust=1673963081204000&amp;usg=AOvVaw3y47L06B2LTrL6qsmaW2Hq"
141-
>
133+
<Link href="https://www.apple.com/" style={productLink}>
142134
Report a Problem
143135
</Link>
144136
</Column>
@@ -183,10 +175,7 @@ export const AppleReceiptEmail = () => (
183175
<Section>
184176
<Row>
185177
<Column align="center" style={walletWrapper}>
186-
<Link
187-
href="https://wallet.apple.com/apple-card/setup/feature/ccs?referrer=cid%3Dapy-120-100003"
188-
style={walletLink}
189-
>
178+
<Link href="https://www.apple.com/" style={walletLink}>
190179
<Img
191180
src={`${baseUrl}/static/apple-wallet.png`}
192181
width="28"
@@ -227,24 +216,21 @@ export const AppleReceiptEmail = () => (
227216
</Text>
228217
<Text style={footerTextCenter}>
229218
Privacy: We use a
230-
<Link href="http://support.apple.com/kb/HT207233" style={footerLink}>
219+
<Link href="https://www.apple.com/" style={footerLink}>
231220
{' '}
232221
Subscriber ID{' '}
233222
</Link>
234223
to provide reports to developers.
235224
</Text>
236225
<Text style={footerTextCenter}>
237226
Get help with subscriptions and purchases.
238-
<Link
239-
href="https://support.apple.com/billing?cid=email_receipt"
240-
style={footerLink}
241-
>
227+
<Link href="https://www.apple.com/" style={footerLink}>
242228
Visit Apple Support.
243229
</Link>
244230
</Text>
245231
<Text style={footerTextCenter}>
246232
Learn how to{' '}
247-
<Link href="https://support.apple.com/kb/HT204030?cid=email_receipt_itunes_article_HT204030">
233+
<Link href="https://www.apple.com/">
248234
manage your password preferences
249235
</Link>{' '}
250236
for iTunes, Apple Books, and App Store purchases.
@@ -256,9 +242,7 @@ export const AppleReceiptEmail = () => (
256242
subscription renewals. If you have opted out, you can still view your
257243
receipts in your account under Purchase History. To manage receipts or
258244
to opt in again, go to{' '}
259-
<Link href="https://finance-app.itunes.apple.com/account/subscriptions?unsupportedRedirectUrl=https://apps.apple.com/US/invoice">
260-
Account Settings.
261-
</Link>
245+
<Link href="https://www.apple.com/">Account Settings.</Link>
262246
</Text>
263247
<Section>
264248
<Row>
@@ -273,14 +257,8 @@ export const AppleReceiptEmail = () => (
273257
</Row>
274258
</Section>
275259
<Text style={footerLinksWrapper}>
276-
<Link href="https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/accountSummary?mt=8">
277-
Account Settings
278-
</Link>{' '}
279-
{' '}
280-
<Link href="https://www.apple.com/legal/itunes/us/sales.html">
281-
Terms of Sale
282-
</Link>{' '}
283-
{' '}
260+
<Link href="https://www.apple.com/">Account Settings</Link>{' '}
261+
<Link href="https://www.apple.com/">Terms of Sale</Link>{' '}
284262
<Link href="https://www.apple.com/legal/privacy/">
285263
Privacy Policy{' '}
286264
</Link>
@@ -344,15 +322,15 @@ const informationTable = {
344322
};
345323

346324
const informationTableRow = {
347-
height: '46px',
325+
minHeight: '46px',
348326
};
349327

350328
const informationTableColumn = {
351329
paddingLeft: '20px',
352330
borderStyle: 'solid',
353331
borderColor: 'white',
354332
borderWidth: '0px 1px 1px 0px',
355-
height: '44px',
333+
minHeight: '44px',
356334
};
357335

358336
const informationTableLabel = {
@@ -371,7 +349,7 @@ const informationTableValue = {
371349
const productTitleTable = {
372350
...informationTable,
373351
margin: '30px 0 15px 0',
374-
height: '24px',
352+
minHeight: '24px',
375353
};
376354

377355
const productsTitle = {
@@ -385,7 +363,7 @@ const productsTitle = {
385363
const productIcon = {
386364
margin: '0 0 0 20px',
387365
borderRadius: '14px',
388-
border: '1px solid rgba(128,128,128,0.2)',
366+
border: '1px solid rgb(242,242,242)',
389367
};
390368

391369
const productTitle = { fontSize: '12px', fontWeight: '600', ...resetText };
@@ -442,7 +420,8 @@ const productPriceWrapper = {
442420
const productPriceLine = { margin: '30px 0 0 0' };
443421

444422
const productPriceVerticalLine = {
445-
height: '48px',
423+
minHeight: '48px',
424+
paddingTop: '48px',
446425
borderLeft: '1px solid',
447426
borderColor: 'rgb(238,238,238)',
448427
};

apps/demo/emails/receipts/nike-receipt.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,29 +170,29 @@ export const NikeReceiptEmail = () => (
170170
</Row>
171171
<Row style={menu.content}>
172172
<Column style={{ width: '33%' }} colSpan={1}>
173-
<Link href="/" style={menu.text}>
173+
<Link href="https://www.nike.com/" style={menu.text}>
174174
Shipping Status
175175
</Link>
176176
</Column>
177177
<Column style={{ width: '33%' }} colSpan={1}>
178-
<Link href="/" style={menu.text}>
178+
<Link href="https://www.nike.com/" style={menu.text}>
179179
Shipping & Delivery
180180
</Link>
181181
</Column>
182182
<Column style={{ width: '33%' }} colSpan={1}>
183-
<Link href="/" style={menu.text}>
183+
<Link href="https://www.nike.com/" style={menu.text}>
184184
Returns & Exchanges
185185
</Link>
186186
</Column>
187187
</Row>
188188
<Row style={{ ...menu.content, paddingTop: '0' }}>
189189
<Column style={{ width: '33%' }} colSpan={1}>
190-
<Link href="/" style={menu.text}>
190+
<Link href="https://www.nike.com/" style={menu.text}>
191191
How to Return
192192
</Link>
193193
</Column>
194194
<Column style={{ width: '66%' }} colSpan={2}>
195-
<Link href="/" style={menu.text}>
195+
<Link href="https://www.nike.com/" style={menu.text}>
196196
Contact Options
197197
</Link>
198198
</Column>
@@ -204,6 +204,7 @@ export const NikeReceiptEmail = () => (
204204
<Column style={{ width: '16px' }}>
205205
<Img
206206
src={`${baseUrl}/static/nike-phone.png`}
207+
alt="Nike Phone"
207208
width="16px"
208209
height="26px"
209210
style={{ paddingRight: '14px' }}
@@ -235,22 +236,22 @@ export const NikeReceiptEmail = () => (
235236
</Row>
236237
<Row style={categories.container}>
237238
<Column align="center">
238-
<Link href="/" style={categories.text}>
239+
<Link href="https://www.nike.com/" style={categories.text}>
239240
Men
240241
</Link>
241242
</Column>
242243
<Column align="center">
243-
<Link href="/" style={categories.text}>
244+
<Link href="https://www.nike.com/" style={categories.text}>
244245
Women
245246
</Link>
246247
</Column>
247248
<Column align="center">
248-
<Link href="/" style={categories.text}>
249+
<Link href="https://www.nike.com/" style={categories.text}>
249250
Kids
250251
</Link>
251252
</Column>
252253
<Column align="center">
253-
<Link href="/" style={categories.text}>
254+
<Link href="https://www.nike.com/" style={categories.text}>
254255
Customize
255256
</Link>
256257
</Column>

0 commit comments

Comments
 (0)