Replace KeyboardAvoidingView with KeyboardAwareScrollView, update dependencies, and handle login 401 error logging
This commit is contained in:
@@ -44,8 +44,11 @@ api.interceptors.response.use(
|
||||
const originalRequest = error.config;
|
||||
|
||||
if (error.response) {
|
||||
console.error('[API ERROR]', error.response.status, error.response.data);
|
||||
|
||||
const isLoginRequest = originalRequest?.url?.includes('/user/login');
|
||||
if (!(error.response.status === 401 && isLoginRequest)) {
|
||||
console.error('[API ERROR]', error.response.status, error.response.data);
|
||||
}
|
||||
|
||||
// If we receive 401 (Unauthorized), we might want to force logout
|
||||
if (error.response.status === 401) {
|
||||
// TODO: Here you can add logic to redirect to login screen if needed
|
||||
|
||||
Reference in New Issue
Block a user