Skip to content

Commit

Permalink
docs(examples): fix logout on next.js
Browse files Browse the repository at this point in the history
  • Loading branch information
vvo committed Feb 16, 2021
1 parent fb4ff35 commit 7ffc8bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/next.js/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ const Header = () => {
href="/api/logout"
onClick={async (e) => {
e.preventDefault();
await mutateUser(
fetchJson("/api/logout", { method: "POST" }),
mutateUser(
await fetchJson("/api/logout", { method: "POST" }),
false,
);
router.push("/login");
}}
Expand Down

1 comment on commit 7ffc8bb

@vercel
Copy link

@vercel vercel bot commented on 7ffc8bb Feb 16, 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.