File tree 4 files changed +15
-12
lines changed
4 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 23
23
npm-debug.log *
24
24
yarn-debug.log *
25
25
yarn-error.log *
26
+
27
+ .netlify
Original file line number Diff line number Diff line change 9
9
},
10
10
"dependencies" : {
11
11
"@reach/router" : " ^1.2.1" ,
12
- "react" : " ^16.8.6 " ,
12
+ "react" : " ^15.0.0 || ^ 16.0.0 " ,
13
13
"react-app-polyfill" : " ^1.0.1" ,
14
- "react-dom" : " ^16.8.6 " ,
14
+ "react-dom" : " ^15.0.0 || ^ 16.0.0 " ,
15
15
"react-netlify-identity" : " ^0.1.7"
16
16
},
17
17
"alias" : {
Original file line number Diff line number Diff line change @@ -6212,7 +6212,7 @@ react-app-polyfill@^1.0.1:
6212
6212
regenerator-runtime "0.13.2"
6213
6213
whatwg-fetch "3.0.0"
6214
6214
6215
- react-dom@^16.8.6 :
6215
+ " react-dom@^15.0.0 || ^ 16.0.0 " :
6216
6216
version "16.8.6"
6217
6217
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f"
6218
6218
integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==
@@ -6240,7 +6240,7 @@ react-netlify-identity@^0.1.7:
6240
6240
gotrue-js "^0.9.25"
6241
6241
tsdx "^0.6.0"
6242
6242
6243
- react@^16.8.6 :
6243
+ " react@^15.0.0 || ^ 16.0.0 " :
6244
6244
version "16.8.6"
6245
6245
resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe"
6246
6246
integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==
Original file line number Diff line number Diff line change @@ -87,10 +87,7 @@ export function IdentityContextProvider({
87
87
'. Please check the docs for proper usage or file an issue.'
88
88
) ;
89
89
}
90
- const identity = React . useMemo ( ( ) => useNetlifyIdentity ( url , onAuthChange ) , [
91
- url ,
92
- onAuthChange ,
93
- ] ) ;
90
+ const identity = useNetlifyIdentity ( url , onAuthChange ) ;
94
91
return (
95
92
< _IdentityCtxProvider value = { identity } > { children } </ _IdentityCtxProvider >
96
93
) ;
@@ -102,10 +99,14 @@ export function useNetlifyIdentity(
102
99
onAuthChange : authChangeParam = ( ) => { } ,
103
100
enableRunRoutes : boolean = true
104
101
) : ReactNetlifyIdentityAPI {
105
- const goTrueInstance = new GoTrue ( {
106
- APIUrl : `${ url } /.netlify/identity` ,
107
- setCookie : true ,
108
- } ) ;
102
+ const goTrueInstance = React . useMemo (
103
+ ( ) =>
104
+ new GoTrue ( {
105
+ APIUrl : `${ url } /.netlify/identity` ,
106
+ setCookie : true ,
107
+ } ) ,
108
+ [ url ]
109
+ ) ;
109
110
110
111
const [ user , setUser ] = React . useState < User | undefined > (
111
112
goTrueInstance . currentUser ( ) || undefined
You can’t perform that action at this time.
0 commit comments