There was an error while loading. Please reload this page.
1 parent 263e48c commit f428dc1Copy full SHA for f428dc1
src/Context/authContext.js
@@ -32,7 +32,7 @@ export const AuthProvider = ({children}) => {
32
if(storageUser && storageToken){
33
setUser(JSON.parse(storageUser));
34
setLoading(false)
35
- }
+ } setLoading(false)//para o caso a pessoa deslogue, o icone de carregar irá sumir
36
}
37
LoadStorageData();
38
},[])
@@ -77,6 +77,7 @@ export const AuthProvider = ({children}) => {
77
function signOut(){
78
AsyncStorage.clear().then(()=>{
79
setUser(null)
80
+ setLoading(false)//para a tela de carregamento sumir logo após o logout
81
})
82
83
/************* Deslogar *************/
0 commit comments