Skip to content

Commit

Permalink
feat(next-sample): upgrade to next 13 (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangsijie authored Dec 7, 2022
1 parent 080fb88 commit 63593d4
Show file tree
Hide file tree
Showing 4 changed files with 312 additions and 26 deletions.
6 changes: 3 additions & 3 deletions packages/next-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"dependencies": {
"@logto/next": "^1.0.0-beta.13",
"next": "^12.2.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"next": "^13.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"swr": "^1.3.0"
},
"devDependencies": {
Expand Down
8 changes: 2 additions & 6 deletions packages/next-sample/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,9 @@ const Home = () => {
</header>
<nav>
{data?.isAuthenticated ? (
<Link href="/api/logto/sign-out">
<a>Sign Out</a>
</Link>
<Link href="/api/logto/sign-out">Sign Out</Link>
) : (
<Link href="/api/logto/sign-in">
<a>Sign In</a>
</Link>
<Link href="/api/logto/sign-in">Sign In</Link>
)}
</nav>
{claims}
Expand Down
4 changes: 1 addition & 3 deletions packages/next-sample/pages/protected.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ const Protected = () => {
<h1>Hello Logto.</h1>
</header>
<nav>
<Link href="/">
<a>Go Home</a>
</Link>
<Link href="/">Go Home</Link>
</nav>
{data && (
<div>
Expand Down
Loading

0 comments on commit 63593d4

Please sign in to comment.