Skip to content
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

feat: Made Initial component for WelcomeEmail #21

Merged
merged 12 commits into from
Oct 22, 2024

Conversation

AlanKha
Copy link
Contributor

@AlanKha AlanKha commented Oct 19, 2024

Description

Replaced the stripe-welcome.tsx with WelcomeEmail.tsx Basically just took the email from stripe and Changed the wording, links, logo, etc.

Can be tested with the following code in src/app/page.tsx

import React from "react";
import WelcomeEmail from "@/components/emails/WelcomeEmail";

export default function Home() {
  return (
    <>
      <WelcomeEmail firstName="John" programName="Test Program" />
    </>
  );
}

I wanted to note that there is a hydration error when testing it this way. I believe this is just an error for how it's being rendered in the browser instead of an email, but I'm not sure.

Relevant Issues

Closes #10 - Create Welcome Email

@AlanKha AlanKha added the Task Sprint Assignment label Oct 19, 2024
@AlanKha AlanKha self-assigned this Oct 19, 2024
Copy link
Member

@RudraPatel2003 RudraPatel2003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, just gotta polish it up a bit to keep our repo consistent and fix that rendering issue

Firstly, the PR title rules have that initial verb be lowercase; So it would be feat not Feat

Make sure you have the ESLint VSCode extension installed to fix all warnings and errors in the future!

Merge with main to get the PNG logo (which will also make certain linting rules fail the build)

For future testing, use pnpm run email-dev

Also, you can update the sendWelcomeEmail server action to render your component as the HTML? Then, to test it finally, make a button on the client component send page that when you click it sends the email.
See step 3 with the render function: https://react.email/docs/integrations/nodemailer

src/components/emails/WelcomeEmail.tsx Outdated Show resolved Hide resolved
src/components/emails/WelcomeEmail.tsx Show resolved Hide resolved
src/components/emails/WelcomeEmail.tsx Outdated Show resolved Hide resolved
src/components/emails/WelcomeEmail.tsx Outdated Show resolved Hide resolved
src/components/emails/WelcomeEmail.tsx Outdated Show resolved Hide resolved
src/components/emails/WelcomeEmail.tsx Outdated Show resolved Hide resolved
src/components/emails/WelcomeEmail.tsx Outdated Show resolved Hide resolved
src/components/emails/stripe-welcome.tsx Outdated Show resolved Hide resolved
@AlanKha AlanKha changed the title Feat: Made Initial component for WelcomeEmail feat: Made Initial component for WelcomeEmail Oct 22, 2024
@AlanKha
Copy link
Contributor Author

AlanKha commented Oct 22, 2024

Everything looks good on my end

@RudraPatel2003 RudraPatel2003 merged commit 6095265 into main Oct 22, 2024
1 check passed
@RudraPatel2003 RudraPatel2003 deleted the Alan-Khalili-Welcome-Email branch October 22, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Sprint Assignment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants