File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,9 @@ import React, {
4
4
useEffect ,
5
5
createContext ,
6
6
useContext ,
7
+ useCallback ,
7
8
// types
8
- Dispatch ,
9
- SetStateAction ,
10
9
ReactNode ,
11
- useCallback ,
12
10
} from 'react' ;
13
11
14
12
import GoTrue , {
@@ -48,7 +46,7 @@ type MaybeUserPromise = Promise<User | undefined>;
48
46
export type ReactNetlifyIdentityAPI = {
49
47
user : User | undefined ;
50
48
/** not meant for normal use! you should mostly use one of the other exported methods to update the user instance */
51
- setUser : Dispatch < SetStateAction < User | undefined > > ;
49
+ setUser : ( _user : GoTrueUser | undefined ) => GoTrueUser | undefined ;
52
50
isConfirmedUser : boolean ;
53
51
isLoggedIn : boolean ;
54
52
signupUser : (
@@ -294,7 +292,7 @@ export function useNetlifyIdentity(
294
292
return {
295
293
user,
296
294
/** not meant for normal use! you should mostly use one of the other exported methods to update the user instance */
297
- setUser,
295
+ setUser : _setUser ,
298
296
isConfirmedUser : ! ! ( user && user . confirmed_at ) ,
299
297
isLoggedIn : ! ! user ,
300
298
signupUser,
You can’t perform that action at this time.
0 commit comments