fix: resolve 6 frontend-mobile build and runtime issues
Run Tests on Branches / Backend Tests (push) Successful in 1m56s
Run Tests on Branches / Frontend Tests (push) Successful in 1m54s

- 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:
Antoni Nuñez Romeu
2026-07-07 16:07:15 +02:00
parent fc12582814
commit 2843b61f82
3 changed files with 54 additions and 110 deletions
+2 -2
View File
@@ -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',
},
};