fix login & verify code
This commit is contained in:
@@ -78,12 +78,9 @@ function AuthProvider({ children }: AuthProviderProps) {
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
console.log('initialize', state);
|
||||
|
||||
try {
|
||||
const accessToken = getSession();
|
||||
|
||||
console.log('');
|
||||
if (accessToken) {
|
||||
setSession(accessToken);
|
||||
|
||||
@@ -144,6 +141,8 @@ function AuthProvider({ children }: AuthProviderProps) {
|
||||
user,
|
||||
},
|
||||
});
|
||||
|
||||
return response.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
if (error.response.status !== 404) throw error.response;
|
||||
|
||||
Reference in New Issue
Block a user