Skip to content

Commit

Permalink
Fix(docs): add await to the integration examples in the documentation (
Browse files Browse the repository at this point in the history
  • Loading branch information
ickynavigator authored Sep 11, 2024
1 parent 6b12e0a commit 598fe95
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions apps/docs/integrations/aws-ses.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import { Email } from './email';

const ses = new SES({ region: process.env.AWS_SES_REGION })

const emailHtml = render(<Email url="https://example.com" />);
const emailHtml = await render(<Email url="https://example.com" />);

const params = {
Source: 'you@example.com',
Expand Down Expand Up @@ -88,7 +88,7 @@ import { Email } from './email';

const ses = new SES({ region: process.env.AWS_SES_REGION })

const emailHtml = render(Email({ url:"https://example.com" }));
const emailHtml = await render(Email({ url:"https://example.com" }));

const params = {
Source: 'you@example.com',
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/integrations/mailersend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const mailerSend = new MailerSend({
apiKey: process.env.MAILERSEND_API_KEY || '',
});

const emailHtml = render(<Email url="https://example.com" />);
const emailHtml = await render(<Email url="https://example.com" />);

const sentFrom = new Sender("you@yourdomain.com", "Your name");
const recipients = [
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/integrations/nodemailer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const transporter = nodemailer.createTransport({
},
});

const emailHtml = render(<Email url="https://example.com" />);
const emailHtml = await render(<Email url="https://example.com" />);

const options = {
from: 'you@example.com',
Expand All @@ -92,7 +92,7 @@ const transporter = nodemailer.createTransport({
},
});

const emailHtml = render(Email({ url: "https://example.com" }));
const emailHtml = await render(Email({ url: "https://example.com" }));

const options = {
from: 'you@example.com',
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/integrations/plunk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Import the email template you just built, convert into a HTML string, and use th

const plunk = new Plunk(process.env.PLUNK_API_KEY);

const emailHtml = render(<Email url="https://example.com" />);
const emailHtml = await render(<Email url="https://example.com" />);

plunk.emails.send({
to: "hello@useplunk.com",
Expand All @@ -75,7 +75,7 @@ Import the email template you just built, convert into a HTML string, and use th

const plunk = new Plunk(process.env.PLUNK_API_KEY);

const emailHtml = render(Email({ url: "https://example.com" }));
const emailHtml = await render(Email({ url: "https://example.com" }));

plunk.emails.send({
to: "hello@useplunk.com",
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/integrations/postmark.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import { Email } from './email';

const client = new postmark.ServerClient(process.env.POSTMARK_API_KEY);

const emailHtml = render(<Email url="https://example.com" />);
const emailHtml = await render(<Email url="https://example.com" />);

const options = {
From: 'you@example.com',
Expand All @@ -76,7 +76,7 @@ import { Email } from './email';

const client = new postmark.ServerClient(process.env.POSTMARK_API_KEY);

const emailHtml = render(Email({ url: "https://example.com" }));
const emailHtml = await render(Email({ url: "https://example.com" }));

const options = {
From: 'you@example.com',
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/integrations/scaleway.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const client = createClient({
const transactionalEmailClient = new TransactionalEmail.v1alpha1.API(client);


const emailHtml = render(<Email url="https://example.com" />);
const emailHtml = await render(<Email url="https://example.com" />);

const sender = {
email: "react-email@transactional.email.fr",
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/integrations/sendgrid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import { Email } from './email';

sendgrid.setApiKey(process.env.SENDGRID_API_KEY);

const emailHtml = render(<Email url="https://example.com" />);
const emailHtml = await render(<Email url="https://example.com" />);

const options = {
from: 'you@example.com',
Expand All @@ -76,7 +76,7 @@ import { Email } from './email';

sendgrid.setApiKey(process.env.SENDGRID_API_KEY);

const emailHtml = render(Email({ url: "https://example.com" }));
const emailHtml = await render(Email({ url: "https://example.com" }));

const options = {
from: 'you@example.com',
Expand Down
2 changes: 1 addition & 1 deletion packages/render/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Convert React components into a HTML string.
import { MyTemplate } from "../components/MyTemplate";
import { render } from "@react-email/render";

const html = render(<MyTemplate firstName="Jim" />);
const html = await render(<MyTemplate firstName="Jim" />);
```

## License
Expand Down

1 comment on commit 598fe95

@vercel
Copy link

@vercel vercel bot commented on 598fe95 Sep 11, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

react-email-demo – ./apps/demo

react-email-demo-resend.vercel.app
react-email-demo.vercel.app
react-email-demo-git-main-resend.vercel.app
demo.react.email

Please sign in to comment.