Fix: Resolve app loading timeout issues
- Update incompatible dependencies to match Expo SDK 54 - Add metro.config.js with increased timeout - Temporarily disable react-native-chart-kit to fix loading - Add placeholder for charts in AnalysisScreen - Add TROUBLESHOOTING.md guide - Fix TypeScript error in helpers.ts formatDate function
This commit is contained in:
@@ -7,7 +7,8 @@ import {
|
||||
Dimensions,
|
||||
TouchableOpacity
|
||||
} from 'react-native';
|
||||
import { PieChart, BarChart } from 'react-native-chart-kit';
|
||||
// Temporairement désactivé pour éviter les problèmes de chargement
|
||||
// import { PieChart, BarChart } from 'react-native-chart-kit';
|
||||
import { useAuth } from '../hooks/useAuth';
|
||||
import { transactionService } from '../services/transactionService';
|
||||
import { categoryService } from '../services/categoryService';
|
||||
@@ -216,16 +217,13 @@ export const AnalysisScreen = () => {
|
||||
<>
|
||||
<View style={styles.chartContainer}>
|
||||
<Text style={styles.chartTitle}>Répartition par catégorie</Text>
|
||||
<PieChart
|
||||
data={pieData}
|
||||
width={screenWidth - 48}
|
||||
height={220}
|
||||
chartConfig={chartConfig}
|
||||
accessor="amount"
|
||||
backgroundColor="transparent"
|
||||
paddingLeft="15"
|
||||
absolute
|
||||
/>
|
||||
{/* Graphique temporairement désactivé - sera réactivé après configuration */}
|
||||
<View style={styles.placeholderChart}>
|
||||
<Text style={styles.placeholderText}>📊</Text>
|
||||
<Text style={styles.placeholderSubtext}>
|
||||
Graphique disponible prochainement
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={styles.statsContainer}>
|
||||
@@ -476,5 +474,22 @@ const styles = StyleSheet.create({
|
||||
fontSize: 14,
|
||||
color: '#999',
|
||||
textAlign: 'center'
|
||||
},
|
||||
placeholderChart: {
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
paddingVertical: 60,
|
||||
backgroundColor: '#F8F9FA',
|
||||
borderRadius: 12,
|
||||
marginVertical: 16
|
||||
},
|
||||
placeholderText: {
|
||||
fontSize: 48,
|
||||
marginBottom: 12
|
||||
},
|
||||
placeholderSubtext: {
|
||||
fontSize: 14,
|
||||
color: '#666',
|
||||
textAlign: 'center'
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user