|
1 | 1 | import { |
2 | | - Body, |
3 | | - Button, |
4 | | - Container, |
5 | | - Font, |
6 | | - Heading, |
7 | | - Html, |
8 | | - Link, |
9 | | - Preview, |
10 | | - Section, |
11 | | - Tailwind, |
12 | | - Text, |
| 2 | + Body, |
| 3 | + Button, |
| 4 | + Container, |
| 5 | + Font, |
| 6 | + Heading, |
| 7 | + Html, |
| 8 | + Link, |
| 9 | + Preview, |
| 10 | + Section, |
| 11 | + Tailwind, |
| 12 | + Text, |
13 | 13 | } from "@react-email/components"; |
14 | 14 | import { Footer } from "../components/footer"; |
15 | 15 | import { Logo } from "../components/logo"; |
16 | 16 |
|
17 | 17 | interface Props { |
18 | | - email: string; |
19 | | - url: string; |
| 18 | + email: string; |
| 19 | + url: string; |
| 20 | + inviteCode?: string; |
20 | 21 | } |
21 | 22 |
|
22 | | -export const MagicLinkEmail = ({ email, url }: Props) => { |
23 | | - return ( |
24 | | - <Html> |
25 | | - <Tailwind> |
26 | | - <head> |
27 | | - <Font |
28 | | - fontFamily="Geist" |
29 | | - fallbackFontFamily="Helvetica" |
30 | | - webFont={{ |
31 | | - url: "https://cdn.jsdelivr.net/npm/@fontsource/[email protected]/files/geist-sans-latin-400-normal.woff2", |
32 | | - format: "woff2", |
33 | | - }} |
34 | | - fontWeight={400} |
35 | | - fontStyle="normal" |
36 | | - /> |
| 23 | +export const MagicLinkEmail = ({ email, url, inviteCode }: Props) => { |
| 24 | + return ( |
| 25 | + <Html> |
| 26 | + <Tailwind> |
| 27 | + <head> |
| 28 | + <Font |
| 29 | + fontFamily="Geist" |
| 30 | + fallbackFontFamily="Helvetica" |
| 31 | + webFont={{ |
| 32 | + url: "https://cdn.jsdelivr.net/npm/@fontsource/[email protected]/files/geist-sans-latin-400-normal.woff2", |
| 33 | + format: "woff2", |
| 34 | + }} |
| 35 | + fontWeight={400} |
| 36 | + fontStyle="normal" |
| 37 | + /> |
37 | 38 |
|
38 | | - <Font |
39 | | - fontFamily="Geist" |
40 | | - fallbackFontFamily="Helvetica" |
41 | | - webFont={{ |
42 | | - url: "https://cdn.jsdelivr.net/npm/@fontsource/[email protected]/files/geist-sans-latin-500-normal.woff2", |
43 | | - format: "woff2", |
44 | | - }} |
45 | | - fontWeight={500} |
46 | | - fontStyle="normal" |
47 | | - /> |
48 | | - </head> |
| 39 | + <Font |
| 40 | + fontFamily="Geist" |
| 41 | + fallbackFontFamily="Helvetica" |
| 42 | + webFont={{ |
| 43 | + url: "https://cdn.jsdelivr.net/npm/@fontsource/[email protected]/files/geist-sans-latin-500-normal.woff2", |
| 44 | + format: "woff2", |
| 45 | + }} |
| 46 | + fontWeight={500} |
| 47 | + fontStyle="normal" |
| 48 | + /> |
| 49 | + </head> |
49 | 50 |
|
50 | | - <Preview>Login Link for Comp AI</Preview> |
| 51 | + <Preview>Login Link for Comp AI</Preview> |
51 | 52 |
|
52 | | - <Body className="bg-[#fff] my-auto mx-auto font-sans"> |
53 | | - <Container |
54 | | - className="border-transparent md:border-[#E8E7E1] my-[40px] mx-auto p-[20px] max-w-[600px]" |
55 | | - style={{ borderStyle: "solid", borderWidth: 1 }} |
56 | | - > |
57 | | - <Logo /> |
58 | | - <Heading className="mx-0 my-[30px] p-0 text-[24px] font-normal text-[#121212] text-center"> |
59 | | - Your login link for Comp AI |
60 | | - </Heading> |
| 53 | + <Body className="bg-[#fff] my-auto mx-auto font-sans"> |
| 54 | + <Container |
| 55 | + className="border-transparent md:border-[#E8E7E1] my-[40px] mx-auto p-[20px] max-w-[600px]" |
| 56 | + style={{ borderStyle: "solid", borderWidth: 1 }} |
| 57 | + > |
| 58 | + <Logo /> |
| 59 | + <Heading className="mx-0 my-[30px] p-0 text-[24px] font-normal text-[#121212] text-center"> |
| 60 | + Your login link for Comp AI |
| 61 | + </Heading> |
61 | 62 |
|
62 | | - <Text className="text-[14px] leading-[24px] text-[#121212]"> |
63 | | - Your login link for Comp AI |
64 | | - </Text> |
65 | | - <Section className="mb-[42px] mt-[32px] text-center"> |
66 | | - <Button |
67 | | - className="bg-transparent text-primary text-[14px] text-[#121212] font-medium no-underline text-center px-6 py-3 border border-solid border-[#121212]" |
68 | | - href={url} |
69 | | - > |
70 | | - Login now |
71 | | - </Button> |
72 | | - </Section> |
| 63 | + <Text className="text-[14px] leading-[24px] text-[#121212]"> |
| 64 | + Your login link for Comp AI |
| 65 | + </Text> |
| 66 | + <Section className="mb-[42px] mt-[32px] text-center"> |
| 67 | + <Button |
| 68 | + className="bg-transparent text-primary text-[14px] text-[#121212] font-medium no-underline text-center px-6 py-3 border border-solid border-[#121212]" |
| 69 | + href={url} |
| 70 | + > |
| 71 | + Login now |
| 72 | + </Button> |
| 73 | + </Section> |
73 | 74 |
|
74 | | - <Text className="text-[14px] leading-[24px] text-[#707070] break-all"> |
75 | | - or copy and paste this URL into your browser{" "} |
76 | | - <Link href={url} className="text-[#707070] underline"> |
77 | | - {url} |
78 | | - </Link> |
79 | | - </Text> |
| 75 | + <Text className="text-[14px] leading-[24px] text-[#707070] break-all"> |
| 76 | + or copy and paste this URL into your browser{" "} |
| 77 | + <Link |
| 78 | + href={url} |
| 79 | + className="text-[#707070] underline" |
| 80 | + > |
| 81 | + {url} |
| 82 | + </Link> |
| 83 | + </Text> |
80 | 84 |
|
81 | | - <br /> |
82 | | - <Section> |
83 | | - <Text className="text-[12px] leading-[24px] text-[#666666]"> |
84 | | - this login link was intended for{" "} |
85 | | - <span className="text-[#121212] ">{email}</span>.{" "} |
86 | | - </Text> |
87 | | - </Section> |
| 85 | + <br /> |
| 86 | + <Section> |
| 87 | + <Text className="text-[12px] leading-[24px] text-[#666666]"> |
| 88 | + this login link was intended for{" "} |
| 89 | + <span className="text-[#121212] ">{email}</span> |
| 90 | + .{" "} |
| 91 | + </Text> |
| 92 | + </Section> |
88 | 93 |
|
89 | | - <br /> |
| 94 | + <br /> |
90 | 95 |
|
91 | | - <Footer /> |
92 | | - </Container> |
93 | | - </Body> |
94 | | - </Tailwind> |
95 | | - </Html> |
96 | | - ); |
| 96 | + <Footer /> |
| 97 | + </Container> |
| 98 | + </Body> |
| 99 | + </Tailwind> |
| 100 | + </Html> |
| 101 | + ); |
97 | 102 | }; |
98 | 103 |
|
99 | 104 | export default MagicLinkEmail; |
0 commit comments