mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 19:59:20 +00:00
fix: can't create new user after logout an existing one
This commit is contained in:
@@ -23,7 +23,6 @@ const useAuth = () => {
|
||||
if (token) {
|
||||
api.defaults.headers.Authorization = `Bearer ${JSON.parse(token)}`;
|
||||
setIsAuth(true);
|
||||
setLoading(false);
|
||||
}
|
||||
setLoading(false);
|
||||
|
||||
@@ -32,8 +31,8 @@ const useAuth = () => {
|
||||
const token = localStorage.getItem("token");
|
||||
if (token) {
|
||||
config.headers["Authorization"] = `Bearer ${JSON.parse(token)}`;
|
||||
setIsAuth(true);
|
||||
}
|
||||
setIsAuth(true);
|
||||
return config;
|
||||
},
|
||||
error => {
|
||||
|
||||
Reference in New Issue
Block a user