Skip to content

Commit ddc7125

Browse files
committed
Bugfixing
1 parent 0dda6d1 commit ddc7125

File tree

6 files changed

+65
-46
lines changed

6 files changed

+65
-46
lines changed

examples/nextjs/app/ui/dashboard/current-user.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CheckCircleIcon, XCircleIcon, UserCircleIcon, EnvelopeIcon, PhoneIcon }
33
import createNodeSDK from '@/app/utils/createNodeSDK';
44

55
export default async function CurrentUser() {
6-
const cookieStore = cookies();
6+
const cookieStore = await cookies();
77
const sessionTokenCookie = cookieStore.get('cbo_session_token');
88
const sdk = createNodeSDK();
99
const currentSessionUser = await sdk.sessions().getCurrentUser(sessionTokenCookie?.value ?? '');

examples/nextjs/app/ui/dashboard/session-details.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { jwtDecode } from 'jwt-decode';
22
import { cookies } from 'next/headers';
33

4-
export default function SessionDetails() {
5-
const cookieStore = cookies();
4+
export default async function SessionDetails() {
5+
const cookieStore = await cookies();
66
const sessionTokenCookie = cookieStore.get('cbo_session_token');
77

88
const decodedSessionToken = jwtDecode(sessionTokenCookie?.value ?? '');

examples/nextjs/app/ui/right-intro-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import AuthForm from './auth-form';
55
import Image from 'next/image';
66

77
export default async function RightIntroSection() {
8-
const cookieStore = cookies();
8+
const cookieStore = await cookies();
99
const sessionTokenCookie = cookieStore.get('cbo_session_token');
1010
const sessionToken = sessionTokenCookie?.value;
1111
const isSessionValid = await validateSession(sessionToken);

examples/nextjs/package-lock.json

Lines changed: 32 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/nextjs/tsconfig.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -11,15 +15,17 @@
1115
"moduleResolution": "bundler",
1216
"resolveJsonModule": true,
1317
"isolatedModules": true,
14-
"jsx": "preserve",
18+
"jsx": "react-jsx",
1519
"incremental": true,
1620
"plugins": [
1721
{
1822
"name": "next"
1923
}
2024
],
2125
"paths": {
22-
"@/*": ["./*"]
26+
"@/*": [
27+
"./*"
28+
]
2329
}
2430
},
2531
"include": [
@@ -28,7 +34,10 @@
2834
"**/*.tsx",
2935
".next/types/**/*.ts",
3036
"app/lib/placeholder-data.js",
31-
"scripts/seed.js"
37+
"scripts/seed.js",
38+
".next/dev/types/**/*.ts"
3239
],
33-
"exclude": ["node_modules"]
40+
"exclude": [
41+
"node_modules"
42+
]
3443
}

examples/react/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)