Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
remix-run-bot committed Apr 19, 2023
1 parent f592fb7 commit ab27274
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
12 changes: 9 additions & 3 deletions docs/guides/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ import { loadStripe } from "@stripe/stripe-js";

const stripe = await loadStripe(window.ENV.stripe);

export async function redirectToStripeCheckout(sessionId: string) {
export async function redirectToStripeCheckout(
sessionId: string
) {
return stripe.redirectToCheckout({ sessionId });
}
```
Expand Down Expand Up @@ -284,7 +286,9 @@ This strategy defers initialization until the library is actually used:
```ts lines=[4]
import { loadStripe } from "@stripe/stripe-js";

export async function redirectToStripeCheckout(sessionId: string) {
export async function redirectToStripeCheckout(
sessionId: string
) {
const stripe = await loadStripe(window.ENV.stripe);
return stripe.redirectToCheckout({ sessionId });
}
Expand All @@ -303,7 +307,9 @@ async function getStripe() {
return _stripe;
}

export async function redirectToStripeCheckout(sessionId: string) {
export async function redirectToStripeCheckout(
sessionId: string
) {
const stripe = await getStripe();
return stripe.redirectToCheckout({ sessionId });
}
Expand Down
8 changes: 2 additions & 6 deletions docs/guides/data-writes.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,8 @@ The browser started at `/projects/new`, then posted to `/projects` with the form
If you're newer to web development, you may not have ever used a form this way. Lots of folks have always done:

```html
<form
onSubmit={(event) => {
event.preventDefault();
// good luck!
}}
/>
<form onSubmit={(event) => { event.preventDefault(); // good
luck! }} />
```

If this is you, you're going to be delighted when you see just how easy mutations can be when you just use what browsers (and Remix) have built in!
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/migrating-react-router-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ export const links: LinksFunction = () => {
{ rel: "manifest", href: "/manifest.json" },
{ rel: "stylesheet", href: stylesheetUrl },
];
}
};

export default function Root() {
return (
Expand Down Expand Up @@ -673,7 +673,7 @@ export const meta: MetaFunction = () => {
"og:image:url": "https://remix.run/og-image.png",
"og:image:alt": "Just doin a bunch of hoodrat stuff",
};
}
};

export default function About() {
return (
Expand Down
2 changes: 1 addition & 1 deletion docs/route/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ These descriptors allow you to prefetch the resources for a page the user is lik
```tsx
export const links: LinksFunction = () => {
return [{ page: "/posts/public" }];
}
};
```

This loads up the JavaScript modules, loader data, and the stylesheets (defined in the `links` exports of the next routes) into the browser cache before the user even navigates there.
Expand Down

0 comments on commit ab27274

Please sign in to comment.