fix: resolve 6 frontend-mobile build and runtime issues
- Add missing User type fields (first_name, last_name, email, avatar_url, city, address) used in profile.tsx - Fix expo-constants import to use namespace import (consistent with rest of codebase) - Replace placeholder production API URL with configurable value - Fix avatar preset/color selection passing require() IDs to Image uri by tracking local source separately - Replace all relative fetch() calls with configured axios instance (relative URLs don't resolve in React Native)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import Constants from 'expo-constants';
|
||||
import * as Constants from 'expo-constants';
|
||||
|
||||
const ENV = {
|
||||
development: {
|
||||
API_BASE_URL: 'http://localhost:3001/api',
|
||||
},
|
||||
production: {
|
||||
API_BASE_URL: 'https://your-production-api.com/api',
|
||||
API_BASE_URL: Constants.expoConfig?.extra?.apiUrl || 'https://api.farmafinder.com/api',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user