-
-
Notifications
You must be signed in to change notification settings - Fork 810
chore(webapp): improvements to app emails #2482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c54ad17
793ceee
e6376f6
7f83b93
33d3ac1
96eaf89
bd964a4
b6a2a66
4439bf8
a42c799
8751001
78dbf36
d3a7fcc
6677844
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,67 @@ | ||
import { Body, Container, Head, Html, Link, Preview, Text } from "@react-email/components"; | ||
import { | ||
Body, | ||
Button, | ||
Container, | ||
Hr, | ||
Html, | ||
Link, | ||
Preview, | ||
Section, | ||
Text, | ||
} from "@react-email/components"; | ||
import { Tailwind } from "@react-email/tailwind"; | ||
import { Footer } from "./components/Footer"; | ||
import { Image } from "./components/Image"; | ||
import { anchor, container, h1, main, paragraphLight } from "./components/styles"; | ||
import { hr } from "./components/styles"; | ||
|
||
export default function Email({ magicLink }: { magicLink: string }) { | ||
return ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Switch to a named export per repo guidelines; also use a clearer component name. Avoid default exports. Rename to a named export to align with “No default exports, use function declarations”. -export default function Email({ magicLink }: { magicLink: string }) {
+export function MagicLinkEmail({ magicLink }: { magicLink: string }) { Run to find and update call sites that import the default: #!/bin/bash
# Find default imports of magic-link and re-export patterns using default
rg -nP -C1 '\bimport\s+Email\s+from\s+["\'][^"\']*magic-link' --type=ts --type=tsx
rg -nP -C1 'export\s*{\s*default\s+as\s+[^}]+}\s*from\s*["\'][^"\']*magic-link' --type=ts --type=tsx 🤖 Prompt for AI Agents
|
||
<Html> | ||
<Head /> | ||
<Preview>Log in with this magic link 🪄</Preview> | ||
<Body style={main}> | ||
<Container style={container}> | ||
<Text style={h1}>Log in to Trigger.dev</Text> | ||
<Link | ||
href={magicLink} | ||
target="_blank" | ||
style={{ | ||
...anchor, | ||
display: "block", | ||
}} | ||
> | ||
Click here to log in with this magic link | ||
</Link> | ||
<Text | ||
style={{ | ||
...paragraphLight, | ||
display: "block", | ||
marginBottom: "50px", | ||
}} | ||
> | ||
If you didn't try to log in, you can safely ignore this email. | ||
</Text> | ||
<Image path="/emails/logo-mono.png" width="120" height="22" alt="Trigger.dev" /> | ||
<Footer /> | ||
</Container> | ||
</Body> | ||
<Preview>Log in with this magic link</Preview> | ||
<Tailwind> | ||
<Body className="bg-[#121317] my-auto mx-auto font-sans"> | ||
<Container className="my-[40px] mx-auto p-[20px] max-w-[600px]"> | ||
<Section className="mt-[32px]"> | ||
<Image | ||
path="/emails/logo.png" | ||
width="180px" | ||
height="32px" | ||
alt="Trigger.dev" | ||
className="mt-0 mb-12" | ||
/> | ||
<Text className="text-[24px] font-bold text-[#D7D9DD] mb-8"> | ||
Log in to Trigger.dev | ||
</Text> | ||
<Button | ||
href={magicLink} | ||
className="bg-[#A8FF53] rounded text-[#121317] text-[16px] no-underline text-center px-4 py-3 mb-8" | ||
> | ||
Log in with magic link | ||
</Button> | ||
</Section> | ||
<Section className="mb-6"> | ||
<Text className="text-[14px] text-[#878C99]"> | ||
Can't see the button? Copy and paste this link into your browser:{" "} | ||
</Text> | ||
<Link | ||
href={magicLink} | ||
target="_blank" | ||
className="text-[#6366F1] text-[14px] no-underline" | ||
> | ||
{magicLink} | ||
</Link> | ||
</Section> | ||
<Section> | ||
<Hr style={hr} /> | ||
<Text className="text-[14px] mt-2 mb-0 text-[#878C99]"> | ||
This link expires in 30 minutes and can only be used once. If you didn't try to | ||
log in, you can safely ignore this email. | ||
</Text> | ||
</Section> | ||
<Footer /> | ||
</Container> | ||
</Body> | ||
</Tailwind> | ||
</Html> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,64 @@ | ||
import { Body, Head, Html, Link, Preview, Section, Text } from "@react-email/components"; | ||
import { Body, Container, Head, Html, Link, Preview, Text } from "@react-email/components"; | ||
import { Tailwind } from "@react-email/tailwind"; | ||
import { Footer } from "./components/Footer"; | ||
import { anchor, bullets, footerItalic, main, paragraphLight } from "./components/styles"; | ||
|
||
export default function Email({ name }: { name?: string }) { | ||
return ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Use a named export per repo guideline (no default exports). Switch to a named function export; consider a descriptive name. Apply: -export default function Email({ name }: { name?: string }) {
+export function WelcomeEmail({ name }: { name?: string }) { Update import sites accordingly. #!/bin/bash
rg -nP --type=ts --type=tsx -C2 'export\s+default\s+function\s+Email\(|from\s+["'\'']\./emails/welcome["'\'']' 🤖 Prompt for AI Agents
|
||
<Html> | ||
<Head /> | ||
<Preview>Power up your workflows</Preview> | ||
<Body style={main}> | ||
<Text style={paragraphLight}>Hey {name ?? "there"},</Text> | ||
<Text style={paragraphLight}>I’m Matt, CEO of Trigger.dev.</Text> | ||
<Text style={paragraphLight}> | ||
Our goal is to give developers like you the ability to effortlessly create powerful | ||
workflows in code. | ||
</Text> | ||
<Text style={paragraphLight}> | ||
We recommend{" "} | ||
<Link style={anchor} href="https://app.trigger.dev/templates"> | ||
getting started with one of our templates | ||
</Link>{" "} | ||
to get familiar with how Trigger.dev works, and then moving on to create your own | ||
workflows. | ||
</Text> | ||
<Preview>Welcome to Trigger.dev</Preview> | ||
<Tailwind> | ||
<Body className="bg-[#121317] my-auto mx-auto font-sans"> | ||
<Container className="mb-[40px] mx-auto p-[20px] max-w-[600px] text-[#D7D9DD]"> | ||
<Text className="text-[16px]">Hey {name ?? "there"},</Text> | ||
<Text className="text-[16px]">I’m Matt, CEO of Trigger.dev.</Text> | ||
<Text className="text-[16px]"> | ||
Our goal is to give developers like you the ability to effortlessly create powerful AI | ||
agents and workflows in code. | ||
</Text> | ||
<Text className="text-[16px]"> | ||
I recommend our{" "} | ||
<Link | ||
className="text-[#6366F1] text-[16px] no-underline" | ||
href="https://trigger.dev/docs/quick-start" | ||
> | ||
quick start guide | ||
</Link>{" "} | ||
to get started, or{" "} | ||
<Link | ||
className="text-[#6366F1] text-[16px] no-underline" | ||
href="https://trigger.dev/docs/guides/introduction" | ||
> | ||
one of our examples | ||
</Link>{" "} | ||
to get familiar with how Trigger.dev works, and then move on to create your own | ||
workflow. | ||
</Text> | ||
|
||
<Text style={paragraphLight}> | ||
Feel free to reply to me if you have any questions. You can also{" "} | ||
<Link style={anchor} href="https://cal.com/team/triggerdotdev/call"> | ||
schedule a call | ||
</Link>{" "} | ||
, or join our{" "} | ||
<Link style={anchor} href="https://discord.gg/JtBAxBr2m3"> | ||
Discord server | ||
</Link>{" "} | ||
to connect with the community and our team. | ||
</Text> | ||
<Text className="text-[16px]"> | ||
Feel free to reply to this email if you have any questions or join our{" "} | ||
<Link | ||
className="text-[#6366F1] text-[16px] no-underline" | ||
href="https://discord.gg/JtBAxBr2m3" | ||
> | ||
Discord | ||
</Link>{" "} | ||
to connect with the community and our team. | ||
</Text> | ||
|
||
<Text style={paragraphLight}>We hope you enjoy using Trigger.dev!</Text> | ||
<Text className="text-[16px]">We hope you enjoy using Trigger.dev!</Text> | ||
|
||
<Text style={bullets}>Best,</Text> | ||
<Text style={bullets}>Matt</Text> | ||
<Text style={paragraphLight}>CEO, Trigger.dev</Text> | ||
<Text style={footerItalic}> | ||
If you don’t want me to contact you again, please just let me know and I’ll update your | ||
preferences. | ||
</Text> | ||
<Footer /> | ||
</Body> | ||
<Text className="text-[16px]">Best,</Text> | ||
<Text className="text-[16px]">Matt</Text> | ||
<Text className="text-[16px]">CEO, Trigger.dev</Text> | ||
<Text className="text-[16px]"> | ||
If you don’t want me to contact you again, please just let me know and I’ll update | ||
your preferences. | ||
</Text> | ||
<Footer /> | ||
</Container> | ||
</Body> | ||
</Tailwind> | ||
</Html> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tailwind is imported from the wrong package and unused here.
Footer doesn’t use Tailwind; drop it from the import (and if needed elsewhere, import from @react-email/tailwind, not components).
Apply:
📝 Committable suggestion
🤖 Prompt for AI Agents