File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ node_modules
3
3
dist
4
4
dist-ssr
5
5
* .local
6
+ .idea
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export function AuthProvider({children}: AuthProvider) {
33
33
try {
34
34
const response = await AuthService . singIn ( githubCode ) ;
35
35
const { token, user} = response . data ;
36
- localStorage . setItem ( LOCAL_STORAGE_TOKEN_USER_NAME , token ) ;
36
+ localStorage . setItem ( LOCAL_STORAGE_TOKEN_USER_NAME , token ) ;
37
37
setUser ( user ) ;
38
38
} catch ( error ) {
39
39
console . error ( error ) ;
@@ -52,15 +52,15 @@ export function AuthProvider({children}: AuthProvider) {
52
52
53
53
function singOut ( ) {
54
54
setUser ( null ) ;
55
- localStorage . removeItem ( '@dowhile:token' )
55
+ localStorage . removeItem ( LOCAL_STORAGE_TOKEN_USER_NAME )
56
56
}
57
57
58
58
useEffect ( ( ) => getGithubCodeFromQueryString ( ) , [ ] ) ;
59
59
60
60
useEffect ( ( ) => loadUserFromLocalStorageWhenExists ( ) , [ ] ) ;
61
61
62
62
return (
63
- < AuthContext . Provider value = { { singOut : singOut , user : user , } } >
63
+ < AuthContext . Provider value = { { singOut, user} } >
64
64
{ children }
65
65
</ AuthContext . Provider >
66
66
) ;
You can’t perform that action at this time.
0 commit comments