Skip to content

Commit 598fe95

Browse files
Fix(docs): add await to the integration examples in the documentation (#1672)
1 parent 6b12e0a commit 598fe95

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

apps/docs/integrations/aws-ses.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import { Email } from './email';
5757

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

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

6262
const params = {
6363
Source: '[email protected]',
@@ -88,7 +88,7 @@ import { Email } from './email';
8888

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

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

9393
const params = {
9494
Source: '[email protected]',

apps/docs/integrations/mailersend.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const mailerSend = new MailerSend({
5858
apiKey: process.env.MAILERSEND_API_KEY || '',
5959
});
6060

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

6363
const sentFrom = new Sender("[email protected]", "Your name");
6464
const recipients = [

apps/docs/integrations/nodemailer.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const transporter = nodemailer.createTransport({
6565
},
6666
});
6767

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

7070
const options = {
7171
@@ -92,7 +92,7 @@ const transporter = nodemailer.createTransport({
9292
},
9393
});
9494

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

9797
const options = {
9898

apps/docs/integrations/plunk.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Import the email template you just built, convert into a HTML string, and use th
5959

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

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

6464
plunk.emails.send({
6565
@@ -75,7 +75,7 @@ Import the email template you just built, convert into a HTML string, and use th
7575

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

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

8080
plunk.emails.send({
8181

apps/docs/integrations/postmark.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import { Email } from './email';
5757

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

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

6262
const options = {
6363
@@ -76,7 +76,7 @@ import { Email } from './email';
7676

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

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

8181
const options = {
8282

apps/docs/integrations/scaleway.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const client = createClient({
6666
const transactionalEmailClient = new TransactionalEmail.v1alpha1.API(client);
6767

6868

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

7171
const sender = {
7272

apps/docs/integrations/sendgrid.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import { Email } from './email';
5757

5858
sendgrid.setApiKey(process.env.SENDGRID_API_KEY);
5959

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

6262
const options = {
6363
@@ -76,7 +76,7 @@ import { Email } from './email';
7676

7777
sendgrid.setApiKey(process.env.SENDGRID_API_KEY);
7878

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

8181
const options = {
8282

packages/render/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Convert React components into a HTML string.
3535
import { MyTemplate } from "../components/MyTemplate";
3636
import { render } from "@react-email/render";
3737

38-
const html = render(<MyTemplate firstName="Jim" />);
38+
const html = await render(<MyTemplate firstName="Jim" />);
3939
```
4040

4141
## License

0 commit comments

Comments
 (0)