update
This commit is contained in:
@ -63,7 +63,7 @@ const AuthProvider = ({ children }: PropsWithChildren) => {
|
||||
id: auth.user.id,
|
||||
role_name: auth.role_name,
|
||||
user: auth.user,
|
||||
statusbalance: auth.role.status_balance
|
||||
statusbalance: auth.role?.status_balance ?? null // SAFE ACCESS
|
||||
};
|
||||
|
||||
saveAuth(enhancedAuth);
|
||||
@ -76,6 +76,7 @@ const AuthProvider = ({ children }: PropsWithChildren) => {
|
||||
};
|
||||
doSaveLogActivity(createActivity);
|
||||
} catch (error: any) {
|
||||
console.error('Login error:', error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
@ -160,4 +161,4 @@ const AuthProvider = ({ children }: PropsWithChildren) => {
|
||||
);
|
||||
};
|
||||
|
||||
export { AuthContext, AuthProvider };
|
||||
export { AuthContext, AuthProvider };
|
||||
Reference in New Issue
Block a user