File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ jobs:
166
166
167
167
- name : Build (example/app)
168
168
working-directory : example/app
169
- run : bun run --bun lint && bun run --bun build
169
+ run : bun run lint && bun run --bun build
170
170
171
171
- name : deploy (example) upload next.js app
172
172
working-directory : example/cdk
Original file line number Diff line number Diff line change 1
- import { useEffect , useState } from 'react' ;
1
+ import { useEffect , useMemo , useState } from 'react' ;
2
2
import { Buffer } from 'buffer' ;
3
3
4
4
const endpoint = process . env . NEXT_PUBLIC_COGNITO_ENDPOINT ;
@@ -25,7 +25,7 @@ const useAuth = () => {
25
25
const [ token , setToken ] = useState < AccessToken > ( ) ;
26
26
27
27
const location =
28
- typeof window !== 'undefined' ? new URL ( window . location . href ) : undefined ;
28
+ useMemo ( ( ) => typeof window !== 'undefined' ? new URL ( window . location . href ) : undefined , [ ] ) ;
29
29
const params = location ?. searchParams ;
30
30
const code = params ?. has ( 'code' ) ? params . get ( 'code' ) : undefined ;
31
31
@@ -67,7 +67,7 @@ const useAuth = () => {
67
67
}
68
68
} ;
69
69
fetchToken ( ) ;
70
- } , [ code ] ) ;
70
+ } , [ location , code ] ) ;
71
71
72
72
return { code, token } ;
73
73
} ;
Original file line number Diff line number Diff line change 26
26
]
27
27
},
28
28
"include" : [
29
- " next-env.d.ts" ,
30
29
" **/*.ts" ,
31
- " **/*.tsx"
30
+ " **/*.tsx" ,
31
+ " next-env.d.ts" ,
32
+ " .next/types/**/*.ts"
32
33
],
33
34
"exclude" : [
34
35
" node_modules" ,
You can’t perform that action at this time.
0 commit comments