@tracked/emails 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +211 -0
- package/dist/emails/bodyweight-goal-reached.d.ts +14 -0
- package/dist/emails/bodyweight-goal-reached.d.ts.map +1 -0
- package/dist/emails/bodyweight-goal-reached.js +177 -0
- package/dist/emails/bodyweight-goal-reached.js.map +1 -0
- package/dist/emails/client-accepted-invitation.d.ts +10 -0
- package/dist/emails/client-accepted-invitation.d.ts.map +1 -0
- package/dist/emails/client-accepted-invitation.js +99 -0
- package/dist/emails/client-accepted-invitation.js.map +1 -0
- package/dist/emails/coach-invite.d.ts +10 -0
- package/dist/emails/coach-invite.d.ts.map +1 -0
- package/dist/emails/coach-invite.js +126 -0
- package/dist/emails/coach-invite.js.map +1 -0
- package/dist/emails/coach-removed-client.d.ts +8 -0
- package/dist/emails/coach-removed-client.d.ts.map +1 -0
- package/dist/emails/coach-removed-client.js +80 -0
- package/dist/emails/coach-removed-client.js.map +1 -0
- package/dist/emails/direct-message.d.ts +11 -0
- package/dist/emails/direct-message.d.ts.map +1 -0
- package/dist/emails/direct-message.js +103 -0
- package/dist/emails/direct-message.js.map +1 -0
- package/dist/emails/feature-discovery.d.ts +11 -0
- package/dist/emails/feature-discovery.d.ts.map +1 -0
- package/dist/emails/feature-discovery.js +121 -0
- package/dist/emails/feature-discovery.js.map +1 -0
- package/dist/emails/first-workout-assigned.d.ts +10 -0
- package/dist/emails/first-workout-assigned.d.ts.map +1 -0
- package/dist/emails/first-workout-assigned.js +98 -0
- package/dist/emails/first-workout-assigned.js.map +1 -0
- package/dist/emails/first-workout-completed.d.ts +11 -0
- package/dist/emails/first-workout-completed.d.ts.map +1 -0
- package/dist/emails/first-workout-completed.js +129 -0
- package/dist/emails/first-workout-completed.js.map +1 -0
- package/dist/emails/index.d.ts +7 -0
- package/dist/emails/index.d.ts.map +1 -0
- package/dist/emails/index.js +7 -0
- package/dist/emails/index.js.map +1 -0
- package/dist/emails/new-follower.d.ts +11 -0
- package/dist/emails/new-follower.d.ts.map +1 -0
- package/dist/emails/new-follower.js +98 -0
- package/dist/emails/new-follower.js.map +1 -0
- package/dist/emails/subscription-canceled.d.ts +10 -0
- package/dist/emails/subscription-canceled.d.ts.map +1 -0
- package/dist/emails/subscription-canceled.js +131 -0
- package/dist/emails/subscription-canceled.js.map +1 -0
- package/dist/emails/support-email.d.ts +8 -0
- package/dist/emails/support-email.d.ts.map +1 -0
- package/dist/emails/support-email.js +40 -0
- package/dist/emails/support-email.js.map +1 -0
- package/dist/emails/team-invite.d.ts +11 -0
- package/dist/emails/team-invite.d.ts.map +1 -0
- package/dist/emails/team-invite.js +100 -0
- package/dist/emails/team-invite.js.map +1 -0
- package/dist/emails/team-member-removed-email.d.ts +8 -0
- package/dist/emails/team-member-removed-email.d.ts.map +1 -0
- package/dist/emails/team-member-removed-email.js +97 -0
- package/dist/emails/team-member-removed-email.js.map +1 -0
- package/dist/emails/tracked-magic-link-activate.d.ts +7 -0
- package/dist/emails/tracked-magic-link-activate.d.ts.map +1 -0
- package/dist/emails/tracked-magic-link-activate.js +93 -0
- package/dist/emails/tracked-magic-link-activate.js.map +1 -0
- package/dist/emails/tracked-magic-link.d.ts +7 -0
- package/dist/emails/tracked-magic-link.d.ts.map +1 -0
- package/dist/emails/tracked-magic-link.js +101 -0
- package/dist/emails/tracked-magic-link.js.map +1 -0
- package/dist/emails/week-one-checkin.d.ts +10 -0
- package/dist/emails/week-one-checkin.d.ts.map +1 -0
- package/dist/emails/week-one-checkin.js +141 -0
- package/dist/emails/week-one-checkin.js.map +1 -0
- package/dist/emails/welcome.d.ts +8 -0
- package/dist/emails/welcome.d.ts.map +1 -0
- package/dist/emails/welcome.js +146 -0
- package/dist/emails/welcome.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/email-validation.d.ts +48 -0
- package/dist/utils/email-validation.d.ts.map +1 -0
- package/dist/utils/email-validation.js +72 -0
- package/dist/utils/email-validation.js.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/username-validation.d.ts +54 -0
- package/dist/utils/username-validation.d.ts.map +1 -0
- package/dist/utils/username-validation.js +76 -0
- package/dist/utils/username-validation.js.map +1 -0
- package/package.json +78 -0
- package/src/emails/bodyweight-goal-reached.tsx +396 -0
- package/src/emails/client-accepted-invitation.tsx +258 -0
- package/src/emails/coach-invite.tsx +270 -0
- package/src/emails/coach-removed-client.tsx +212 -0
- package/src/emails/direct-message.tsx +249 -0
- package/src/emails/feature-discovery.tsx +289 -0
- package/src/emails/first-workout-assigned.tsx +255 -0
- package/src/emails/first-workout-completed.tsx +312 -0
- package/src/emails/index.tsx +6 -0
- package/src/emails/new-follower.tsx +260 -0
- package/src/emails/subscription-canceled.tsx +311 -0
- package/src/emails/support-email.tsx +80 -0
- package/src/emails/team-invite.tsx +262 -0
- package/src/emails/team-member-removed-email.tsx +240 -0
- package/src/emails/tracked-magic-link-activate.tsx +252 -0
- package/src/emails/tracked-magic-link.tsx +264 -0
- package/src/emails/week-one-checkin.tsx +353 -0
- package/src/emails/welcome.tsx +341 -0
- package/src/index.ts +57 -0
- package/src/utils/email-validation.test.ts +78 -0
- package/src/utils/email-validation.ts +80 -0
- package/src/utils/index.ts +13 -0
- package/src/utils/username-validation.test.ts +118 -0
- package/src/utils/username-validation.ts +89 -0
- package/static/tracked-logo.png +0 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Body,
|
|
4
|
+
Column,
|
|
5
|
+
Container,
|
|
6
|
+
Head,
|
|
7
|
+
Hr,
|
|
8
|
+
Html,
|
|
9
|
+
Img,
|
|
10
|
+
Link,
|
|
11
|
+
Preview,
|
|
12
|
+
Row,
|
|
13
|
+
Section,
|
|
14
|
+
Text,
|
|
15
|
+
} from "@react-email/components";
|
|
16
|
+
|
|
17
|
+
interface SubscriptionCanceledEmailProps {
|
|
18
|
+
userName: string;
|
|
19
|
+
cancellationDate: string;
|
|
20
|
+
feedbackUrl?: string;
|
|
21
|
+
reactivateUrl: string;
|
|
22
|
+
websiteUrl: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
|
|
26
|
+
|
|
27
|
+
export const SubscriptionCanceledEmail = ({
|
|
28
|
+
userName,
|
|
29
|
+
cancellationDate,
|
|
30
|
+
feedbackUrl,
|
|
31
|
+
reactivateUrl,
|
|
32
|
+
websiteUrl = "https://tracked.gg",
|
|
33
|
+
}: SubscriptionCanceledEmailProps) => {
|
|
34
|
+
return (
|
|
35
|
+
<Html>
|
|
36
|
+
<Head>
|
|
37
|
+
<meta name="color-scheme" content="light only" />
|
|
38
|
+
<meta name="supported-color-schemes" content="light only" />
|
|
39
|
+
</Head>
|
|
40
|
+
<Preview>Your Tracked subscription has been canceled</Preview>
|
|
41
|
+
<Body style={main}>
|
|
42
|
+
<Container style={container}>
|
|
43
|
+
<Section style={box}>
|
|
44
|
+
<Row style={{ marginBottom: "8px" }}>
|
|
45
|
+
<Column style={{ width: "auto", verticalAlign: "middle" }}>
|
|
46
|
+
<Img src={`${baseUrl}`} width="28" height="28" alt="Tracked" />
|
|
47
|
+
</Column>
|
|
48
|
+
<Column
|
|
49
|
+
style={{
|
|
50
|
+
width: "auto",
|
|
51
|
+
verticalAlign: "middle",
|
|
52
|
+
paddingLeft: "4px",
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
<Text
|
|
56
|
+
style={{
|
|
57
|
+
fontSize: "28px",
|
|
58
|
+
fontWeight: "900",
|
|
59
|
+
fontFamily:
|
|
60
|
+
"Raleway, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
61
|
+
color: "#020617",
|
|
62
|
+
margin: "0",
|
|
63
|
+
lineHeight: "32px",
|
|
64
|
+
letterSpacing: "0.5px",
|
|
65
|
+
}}
|
|
66
|
+
>
|
|
67
|
+
TRACKED
|
|
68
|
+
</Text>
|
|
69
|
+
</Column>
|
|
70
|
+
</Row>
|
|
71
|
+
<Hr style={hr} />
|
|
72
|
+
|
|
73
|
+
<Text style={heading}>Subscription Canceled</Text>
|
|
74
|
+
<Text style={paragraph}>
|
|
75
|
+
Hi {userName}, we've confirmed that your Tracked subscription has
|
|
76
|
+
been canceled.
|
|
77
|
+
</Text>
|
|
78
|
+
|
|
79
|
+
<Section style={infoBox}>
|
|
80
|
+
<Text style={infoHeading}>What happens next:</Text>
|
|
81
|
+
<Text style={infoText}>
|
|
82
|
+
• Your subscription will remain active until {cancellationDate}
|
|
83
|
+
</Text>
|
|
84
|
+
<Text style={infoText}>
|
|
85
|
+
• You'll continue to have full access until that date
|
|
86
|
+
</Text>
|
|
87
|
+
<Text style={infoText}>
|
|
88
|
+
• Your data will be safely stored and available if you return
|
|
89
|
+
</Text>
|
|
90
|
+
</Section>
|
|
91
|
+
|
|
92
|
+
<Text style={paragraph}>
|
|
93
|
+
We're sorry to see you go! Your feedback helps us improve Tracked
|
|
94
|
+
for everyone.
|
|
95
|
+
</Text>
|
|
96
|
+
|
|
97
|
+
{feedbackUrl && (
|
|
98
|
+
<div
|
|
99
|
+
style={{
|
|
100
|
+
marginTop: "16px",
|
|
101
|
+
marginBottom: "16px",
|
|
102
|
+
textAlign: "left" as const,
|
|
103
|
+
}}
|
|
104
|
+
>
|
|
105
|
+
<a
|
|
106
|
+
href={feedbackUrl}
|
|
107
|
+
style={{
|
|
108
|
+
backgroundColor: "transparent",
|
|
109
|
+
border: "1px solid #4ade80",
|
|
110
|
+
borderRadius: "8px",
|
|
111
|
+
fontSize: "14px",
|
|
112
|
+
fontWeight: "bold",
|
|
113
|
+
textDecoration: "none",
|
|
114
|
+
padding: "10px 24px",
|
|
115
|
+
display: "inline-block",
|
|
116
|
+
}}
|
|
117
|
+
>
|
|
118
|
+
<span
|
|
119
|
+
style={{
|
|
120
|
+
color: "#4ade80",
|
|
121
|
+
textDecoration: "none",
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
124
|
+
Share Feedback
|
|
125
|
+
</span>
|
|
126
|
+
</a>
|
|
127
|
+
</div>
|
|
128
|
+
)}
|
|
129
|
+
|
|
130
|
+
<Section style={winbackBox}>
|
|
131
|
+
<Text style={winbackHeading}>Changed your mind?</Text>
|
|
132
|
+
<Text style={winbackText}>
|
|
133
|
+
You can reactivate your subscription at any time before{" "}
|
|
134
|
+
{cancellationDate}.
|
|
135
|
+
</Text>
|
|
136
|
+
<div
|
|
137
|
+
style={{
|
|
138
|
+
marginTop: "16px",
|
|
139
|
+
textAlign: "left" as const,
|
|
140
|
+
}}
|
|
141
|
+
>
|
|
142
|
+
<a
|
|
143
|
+
href={reactivateUrl}
|
|
144
|
+
style={{
|
|
145
|
+
backgroundColor: "#0f172a",
|
|
146
|
+
borderRadius: "8px",
|
|
147
|
+
fontSize: "16px",
|
|
148
|
+
fontWeight: "bold",
|
|
149
|
+
textDecoration: "none",
|
|
150
|
+
padding: "12px 32px",
|
|
151
|
+
display: "inline-block",
|
|
152
|
+
}}
|
|
153
|
+
>
|
|
154
|
+
<span style={{ color: "#ffffff", textDecoration: "none" }}>
|
|
155
|
+
Reactivate Subscription
|
|
156
|
+
</span>
|
|
157
|
+
</a>
|
|
158
|
+
</div>
|
|
159
|
+
</Section>
|
|
160
|
+
|
|
161
|
+
<div
|
|
162
|
+
style={{
|
|
163
|
+
textAlign: "left" as const,
|
|
164
|
+
margin: "24px 0",
|
|
165
|
+
}}
|
|
166
|
+
>
|
|
167
|
+
<a
|
|
168
|
+
href="https://www.discord.gg/trackedgg"
|
|
169
|
+
style={{
|
|
170
|
+
backgroundColor: "#5865F2",
|
|
171
|
+
borderRadius: "8px",
|
|
172
|
+
fontSize: "16px",
|
|
173
|
+
fontWeight: "bold",
|
|
174
|
+
textDecoration: "none",
|
|
175
|
+
padding: "12px 32px",
|
|
176
|
+
display: "inline-block",
|
|
177
|
+
}}
|
|
178
|
+
>
|
|
179
|
+
<span style={{ color: "#ffffff", textDecoration: "none" }}>
|
|
180
|
+
Join our Discord Community
|
|
181
|
+
</span>
|
|
182
|
+
</a>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
<Hr style={hr} />
|
|
186
|
+
<Text style={footer}>
|
|
187
|
+
Copyright © Tracked Training Platform Inc. <br /> 9101 Horne
|
|
188
|
+
Street, Vancouver, BC
|
|
189
|
+
</Text>
|
|
190
|
+
|
|
191
|
+
<Container>
|
|
192
|
+
<Link
|
|
193
|
+
href={`${websiteUrl}/terms`}
|
|
194
|
+
style={{ ...footer, paddingRight: 10 }}
|
|
195
|
+
>
|
|
196
|
+
Terms
|
|
197
|
+
</Link>
|
|
198
|
+
<Link style={{ ...footer, paddingRight: 10 }}> | </Link>
|
|
199
|
+
<Link
|
|
200
|
+
href={`${websiteUrl}/privacy`}
|
|
201
|
+
style={{ ...footer, paddingRight: 10 }}
|
|
202
|
+
>
|
|
203
|
+
Privacy
|
|
204
|
+
</Link>
|
|
205
|
+
<Link style={{ ...footer, paddingRight: 10 }}> | </Link>
|
|
206
|
+
<Link
|
|
207
|
+
href={`${websiteUrl}/support`}
|
|
208
|
+
style={{ ...footer, paddingRight: 10 }}
|
|
209
|
+
>
|
|
210
|
+
Support
|
|
211
|
+
</Link>
|
|
212
|
+
</Container>
|
|
213
|
+
|
|
214
|
+
<Text style={footer}>
|
|
215
|
+
This is a service notification by the Tracked Training Platform.
|
|
216
|
+
</Text>
|
|
217
|
+
</Section>
|
|
218
|
+
</Container>
|
|
219
|
+
</Body>
|
|
220
|
+
</Html>
|
|
221
|
+
);
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
const main = {
|
|
225
|
+
backgroundColor: "#020617", // slate-950
|
|
226
|
+
fontFamily:
|
|
227
|
+
'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
const container = {
|
|
231
|
+
backgroundColor: "#020617", // slate-950
|
|
232
|
+
margin: "0 auto",
|
|
233
|
+
padding: "20px 0 48px",
|
|
234
|
+
marginBottom: "64px",
|
|
235
|
+
borderRadius: "8px",
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
const box = {
|
|
239
|
+
padding: "0 24px",
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
const hr = {
|
|
243
|
+
borderColor: "#4ade80", // green-400
|
|
244
|
+
margin: "24px 0",
|
|
245
|
+
borderWidth: "1px",
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
const paragraph = {
|
|
249
|
+
color: "#ffffff", // white
|
|
250
|
+
fontSize: "16px",
|
|
251
|
+
lineHeight: "24px",
|
|
252
|
+
textAlign: "left" as const,
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
const heading = {
|
|
256
|
+
color: "#ffffff", // white
|
|
257
|
+
fontSize: "24px",
|
|
258
|
+
lineHeight: "32px",
|
|
259
|
+
fontWeight: "bold",
|
|
260
|
+
marginBottom: "16px",
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
const infoBox = {
|
|
264
|
+
backgroundColor: "#1e293b",
|
|
265
|
+
padding: "16px 24px",
|
|
266
|
+
borderRadius: "8px",
|
|
267
|
+
margin: "24px 0",
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
const infoHeading = {
|
|
271
|
+
color: "#ffffff",
|
|
272
|
+
fontSize: "16px",
|
|
273
|
+
fontWeight: "bold",
|
|
274
|
+
marginBottom: "12px",
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
const infoText = {
|
|
278
|
+
color: "#e2e8f0",
|
|
279
|
+
fontSize: "14px",
|
|
280
|
+
lineHeight: "24px",
|
|
281
|
+
marginBottom: "4px",
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const winbackBox = {
|
|
285
|
+
backgroundColor: "#1e293b",
|
|
286
|
+
padding: "20px 24px",
|
|
287
|
+
borderRadius: "8px",
|
|
288
|
+
margin: "24px 0",
|
|
289
|
+
borderLeft: "4px solid #4ade80",
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
const winbackHeading = {
|
|
293
|
+
color: "#4ade80",
|
|
294
|
+
fontSize: "18px",
|
|
295
|
+
fontWeight: "bold",
|
|
296
|
+
marginBottom: "8px",
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
const winbackText = {
|
|
300
|
+
color: "#e2e8f0",
|
|
301
|
+
fontSize: "14px",
|
|
302
|
+
lineHeight: "20px",
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
const footer = {
|
|
306
|
+
color: "#94a3b8", // slate-400 for subtle footer text
|
|
307
|
+
fontSize: "12px",
|
|
308
|
+
lineHeight: "16px",
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
export default SubscriptionCanceledEmail;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Container, Hr, Text } from "@react-email/components";
|
|
3
|
+
|
|
4
|
+
interface SupportEmailProps {
|
|
5
|
+
email: string;
|
|
6
|
+
message: string;
|
|
7
|
+
category: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const SupportEmail = ({
|
|
11
|
+
email,
|
|
12
|
+
message,
|
|
13
|
+
category,
|
|
14
|
+
}: SupportEmailProps) => (
|
|
15
|
+
<Container style={styles.container}>
|
|
16
|
+
<Hr style={styles.hr} />
|
|
17
|
+
<Text style={styles.text}>
|
|
18
|
+
<strong>Email:</strong> {email}
|
|
19
|
+
</Text>
|
|
20
|
+
<Text style={styles.text}>
|
|
21
|
+
<strong>Message:</strong> {message}
|
|
22
|
+
</Text>
|
|
23
|
+
<Text style={styles.text}>
|
|
24
|
+
<strong>Category:</strong> {category}
|
|
25
|
+
</Text>
|
|
26
|
+
|
|
27
|
+
<div
|
|
28
|
+
style={{
|
|
29
|
+
textAlign: "left" as const,
|
|
30
|
+
margin: "24px 0",
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
<a
|
|
34
|
+
href="https://www.discord.gg/trackedgg"
|
|
35
|
+
style={{
|
|
36
|
+
backgroundColor: "#5865F2",
|
|
37
|
+
borderRadius: "8px",
|
|
38
|
+
fontSize: "16px",
|
|
39
|
+
fontWeight: "bold",
|
|
40
|
+
textDecoration: "none",
|
|
41
|
+
padding: "12px 32px",
|
|
42
|
+
display: "inline-block",
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
<span style={{ color: "#ffffff", textDecoration: "none" }}>
|
|
46
|
+
Join our Discord Community
|
|
47
|
+
</span>
|
|
48
|
+
</a>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<Hr style={styles.hr} />
|
|
52
|
+
<Text style={styles.footer}>Tracked, 9101 Horne Street, Vancouver, BC</Text>
|
|
53
|
+
</Container>
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const styles = {
|
|
57
|
+
container: {
|
|
58
|
+
backgroundColor: "#1F2937",
|
|
59
|
+
margin: "0 auto",
|
|
60
|
+
padding: "16px",
|
|
61
|
+
paddingBottom: "64px",
|
|
62
|
+
borderRadius: "10px",
|
|
63
|
+
fontFamily: "sans-serif",
|
|
64
|
+
},
|
|
65
|
+
img: {
|
|
66
|
+
width: "40px",
|
|
67
|
+
height: "40px",
|
|
68
|
+
},
|
|
69
|
+
hr: {
|
|
70
|
+
borderColor: "#e6ebf1",
|
|
71
|
+
margin: "16px 0",
|
|
72
|
+
},
|
|
73
|
+
text: {
|
|
74
|
+
color: "#FFFFFF",
|
|
75
|
+
},
|
|
76
|
+
footer: {
|
|
77
|
+
color: "#6B7280",
|
|
78
|
+
fontSize: "12px",
|
|
79
|
+
},
|
|
80
|
+
};
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Body,
|
|
4
|
+
Button,
|
|
5
|
+
Column,
|
|
6
|
+
Container,
|
|
7
|
+
Head,
|
|
8
|
+
Heading,
|
|
9
|
+
Hr,
|
|
10
|
+
Html,
|
|
11
|
+
Img,
|
|
12
|
+
Link,
|
|
13
|
+
Preview,
|
|
14
|
+
Row,
|
|
15
|
+
Section,
|
|
16
|
+
Tailwind,
|
|
17
|
+
Text,
|
|
18
|
+
} from "@react-email/components";
|
|
19
|
+
|
|
20
|
+
interface TeamInviteEmailProps {
|
|
21
|
+
teamName?: string;
|
|
22
|
+
teamRole?: string;
|
|
23
|
+
invitedByUsername?: string;
|
|
24
|
+
websiteUrl?: string;
|
|
25
|
+
teamImage?: string;
|
|
26
|
+
invitationLink?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
|
|
30
|
+
|
|
31
|
+
export const TeamInviteEmail = ({
|
|
32
|
+
teamName = "Team Tracked Training",
|
|
33
|
+
teamRole = "Athlete",
|
|
34
|
+
websiteUrl = "https://www.tracked.training",
|
|
35
|
+
teamImage,
|
|
36
|
+
invitationLink,
|
|
37
|
+
}: TeamInviteEmailProps) => {
|
|
38
|
+
return (
|
|
39
|
+
<Html>
|
|
40
|
+
<Head />
|
|
41
|
+
<Preview>Team Invite for {teamName}</Preview>
|
|
42
|
+
<Body style={main}>
|
|
43
|
+
<Container style={container}>
|
|
44
|
+
<Section style={box}>
|
|
45
|
+
<Row>
|
|
46
|
+
<Img src={`${baseUrl}`} width="40" height="40" alt="Tracked" />
|
|
47
|
+
</Row>
|
|
48
|
+
<Hr style={hr} />
|
|
49
|
+
{teamImage && (
|
|
50
|
+
<Img
|
|
51
|
+
src={teamImage || baseUrl}
|
|
52
|
+
height="70"
|
|
53
|
+
alt="Tracked"
|
|
54
|
+
style={{
|
|
55
|
+
margin: "0 auto",
|
|
56
|
+
padding: "20px",
|
|
57
|
+
}}
|
|
58
|
+
/>
|
|
59
|
+
)}
|
|
60
|
+
|
|
61
|
+
<Text style={heading}>Invitation to join {teamName}</Text>
|
|
62
|
+
<Text style={paragraph}>
|
|
63
|
+
Join the team as a <strong>{teamRole}</strong> by pressing the
|
|
64
|
+
button below.
|
|
65
|
+
</Text>
|
|
66
|
+
<Button style={button} href={invitationLink}>
|
|
67
|
+
Join Team
|
|
68
|
+
</Button>
|
|
69
|
+
|
|
70
|
+
<Text style={{ ...paragraph }}>
|
|
71
|
+
If this email was not expected, please ignore it. You can learn
|
|
72
|
+
more about the Tracked Training Platform by visiting our{" "}
|
|
73
|
+
<Link style={anchor} href={websiteUrl}>
|
|
74
|
+
website
|
|
75
|
+
</Link>
|
|
76
|
+
.
|
|
77
|
+
</Text>
|
|
78
|
+
|
|
79
|
+
<Row style={row}>
|
|
80
|
+
<Column style={column}>
|
|
81
|
+
<Button
|
|
82
|
+
style={appButton}
|
|
83
|
+
href="https://apps.apple.com/app/tracked-training/id6450913418"
|
|
84
|
+
>
|
|
85
|
+
<Img
|
|
86
|
+
src="https://cdn.trckd.ca/assets/app-store-black.png"
|
|
87
|
+
alt="Download on the App Store"
|
|
88
|
+
style={img}
|
|
89
|
+
/>
|
|
90
|
+
</Button>
|
|
91
|
+
</Column>
|
|
92
|
+
<Column style={column}>
|
|
93
|
+
<Button
|
|
94
|
+
style={appButton}
|
|
95
|
+
href="https://play.google.com/store/apps/details?id=com.tracked.mobile"
|
|
96
|
+
>
|
|
97
|
+
<Img
|
|
98
|
+
src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png"
|
|
99
|
+
alt="Google Play"
|
|
100
|
+
style={img}
|
|
101
|
+
/>
|
|
102
|
+
</Button>
|
|
103
|
+
</Column>
|
|
104
|
+
</Row>
|
|
105
|
+
|
|
106
|
+
<div
|
|
107
|
+
style={{
|
|
108
|
+
textAlign: "left" as const,
|
|
109
|
+
margin: "24px 0",
|
|
110
|
+
}}
|
|
111
|
+
>
|
|
112
|
+
<a
|
|
113
|
+
href="https://www.discord.gg/trackedgg"
|
|
114
|
+
style={{
|
|
115
|
+
backgroundColor: "#5865F2",
|
|
116
|
+
borderRadius: "8px",
|
|
117
|
+
fontSize: "16px",
|
|
118
|
+
fontWeight: "bold",
|
|
119
|
+
textDecoration: "none",
|
|
120
|
+
padding: "12px 32px",
|
|
121
|
+
display: "inline-block",
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
124
|
+
<span style={{ color: "#ffffff", textDecoration: "none" }}>
|
|
125
|
+
Join our Discord Community
|
|
126
|
+
</span>
|
|
127
|
+
</a>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<Hr style={hr} />
|
|
131
|
+
<Text style={footer}>
|
|
132
|
+
Copyright © Tracked Training Platform Inc. <br /> 9101 Horne
|
|
133
|
+
Street, Vancouver, BC
|
|
134
|
+
</Text>
|
|
135
|
+
|
|
136
|
+
<Container>
|
|
137
|
+
<Link
|
|
138
|
+
href="https://tracked.gg/terms"
|
|
139
|
+
style={{ ...footer, paddingRight: 10 }}
|
|
140
|
+
>
|
|
141
|
+
Terms
|
|
142
|
+
</Link>
|
|
143
|
+
<Link style={{ ...footer, paddingRight: 10 }}> | </Link>
|
|
144
|
+
<Link
|
|
145
|
+
href="https://tracked.gg/privacy"
|
|
146
|
+
style={{ ...footer, paddingRight: 10 }}
|
|
147
|
+
>
|
|
148
|
+
Privacy
|
|
149
|
+
</Link>
|
|
150
|
+
<Link style={{ ...footer, paddingRight: 10 }}> | </Link>
|
|
151
|
+
<Link
|
|
152
|
+
href="https://tracked.gg/support"
|
|
153
|
+
style={{ ...footer, paddingRight: 10 }}
|
|
154
|
+
>
|
|
155
|
+
Support
|
|
156
|
+
</Link>
|
|
157
|
+
</Container>
|
|
158
|
+
|
|
159
|
+
<Text style={footer}>
|
|
160
|
+
This is a service notification by the Tracked Training Platform.
|
|
161
|
+
</Text>
|
|
162
|
+
</Section>
|
|
163
|
+
</Container>
|
|
164
|
+
</Body>
|
|
165
|
+
</Html>
|
|
166
|
+
);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export default TeamInviteEmail;
|
|
170
|
+
|
|
171
|
+
const main = {
|
|
172
|
+
backgroundColor: "#1e293b",
|
|
173
|
+
fontFamily:
|
|
174
|
+
'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
const container = {
|
|
178
|
+
backgroundColor: "#0f172a",
|
|
179
|
+
margin: "0 auto",
|
|
180
|
+
padding: "20px 0 48px",
|
|
181
|
+
marginBottom: "64px",
|
|
182
|
+
borderRadius: "5px",
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
const box = {
|
|
186
|
+
padding: "0 48px",
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
const row = {
|
|
190
|
+
display: "flex",
|
|
191
|
+
flexDirection: "row" as const,
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const column = {
|
|
195
|
+
flex: "0 0 48%",
|
|
196
|
+
"@media (maxWidth: 600px)": {
|
|
197
|
+
flex: "0 0 100%",
|
|
198
|
+
marginBottom: "10px",
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const img = {
|
|
203
|
+
maxWidth: "100%",
|
|
204
|
+
height: "auto",
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const appButton = {
|
|
208
|
+
backgroundColor: "transparent",
|
|
209
|
+
borderRadius: "5px",
|
|
210
|
+
color: "#ffffff",
|
|
211
|
+
fontSize: "16px",
|
|
212
|
+
fontWeight: "bold",
|
|
213
|
+
textDecoration: "none",
|
|
214
|
+
textAlign: "center" as const,
|
|
215
|
+
display: "block",
|
|
216
|
+
width: "100%",
|
|
217
|
+
maxWidth: "150px",
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
const hr = {
|
|
221
|
+
borderColor: "#475569",
|
|
222
|
+
margin: "20px 0",
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
const paragraph = {
|
|
226
|
+
color: "#e2e8f0",
|
|
227
|
+
|
|
228
|
+
fontSize: "16px",
|
|
229
|
+
lineHeight: "24px",
|
|
230
|
+
textAlign: "left" as const,
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const heading = {
|
|
234
|
+
color: "#e2e8f0",
|
|
235
|
+
fontSize: "24px",
|
|
236
|
+
lineHeight: "32px",
|
|
237
|
+
fontWeight: "bold",
|
|
238
|
+
textAlign: "left" as const,
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
const anchor = {
|
|
242
|
+
color: "#4ade80",
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
const button = {
|
|
246
|
+
backgroundColor: "#4ade80",
|
|
247
|
+
borderRadius: "5px",
|
|
248
|
+
color: "#0f172a",
|
|
249
|
+
fontSize: "16px",
|
|
250
|
+
fontWeight: "bold",
|
|
251
|
+
textDecoration: "none",
|
|
252
|
+
textAlign: "center" as const,
|
|
253
|
+
display: "block",
|
|
254
|
+
width: "100%",
|
|
255
|
+
padding: "16px 0",
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
const footer = {
|
|
259
|
+
color: "#8898aa",
|
|
260
|
+
fontSize: "12px",
|
|
261
|
+
lineHeight: "16px",
|
|
262
|
+
};
|