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

Fix(docs): add await to the integration examples in the documentation #1672

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading