import React, { useState, useEffect } from 'react'; import { StatusBar } from 'expo-status-bar'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; import { StyleSheet, View, Text, ActivityIndicator } from 'react-native'; import { AppNavigator } from './src/navigation/AppNavigator'; export default function App() { const [error, setError] = useState(null); const [loading, setLoading] = useState(true); useEffect(() => { // Simuler un chargement pour détecter les erreurs const timer = setTimeout(() => { setLoading(false); }, 1000); return () => clearTimeout(timer); }, []); if (loading) { return ( Chargement de WalletTracker... ); } if (error) { return ( ❌ Erreur {error} ); } try { return ( ); } catch (err: any) { return ( ❌ Erreur de chargement {err.message || 'Erreur inconnue'} ); } } const styles = StyleSheet.create({ container: { flex: 1 }, loadingContainer: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F8F9FA' }, loadingText: { marginTop: 16, fontSize: 16, color: '#666' }, errorContainer: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#FFF', padding: 24 }, errorTitle: { fontSize: 24, fontWeight: 'bold', color: '#FF6B6B', marginBottom: 16 }, errorText: { fontSize: 14, color: '#666', textAlign: 'center' } });