Skip to content

Commit

Permalink
docs(examples): fix mutate/await, fixes #329
Browse files Browse the repository at this point in the history
  • Loading branch information
vvo committed Jun 8, 2021
1 parent b1b1541 commit fee7448
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/next-typescript/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const Login = () => {
};

try {
await mutateUser(
fetchJson("/api/login", {
mutateUser(
await fetchJson("/api/login", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body),
Expand Down
4 changes: 2 additions & 2 deletions examples/next.js/pages/login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const Login = () => {
};

try {
await mutateUser(
fetchJson("/api/login", {
mutateUser(
await fetchJson("/api/login", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body),
Expand Down

1 comment on commit fee7448

@vercel
Copy link

@vercel vercel bot commented on fee7448 Jun 8, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.