mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-14 04:21:02 +00:00
refactor(mobile): Remove i18n, expand core screens, update plan
BREAKING: Removed multi-language support (i18n) - will be re-added later Changes: - Removed i18n system (6 language files, LanguageContext) - Expanded WalletScreen, SettingsScreen, SwapScreen with more features - Added KurdistanSun component, HEZ/PEZ token icons - Added EditProfileScreen, WalletSetupScreen - Added button e2e tests (Profile, Settings, Wallet) - Updated plan: honest assessment - 42 nav buttons with mock data - Fixed terminology: Polkadot→Pezkuwi, Substrate→Bizinikiwi Reality check: UI complete with mock data, converting to production one-by-one
This commit is contained in:
+5
-50
@@ -1,70 +1,25 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { View, ActivityIndicator, StyleSheet } from 'react-native';
|
||||
import React from 'react';
|
||||
import { StatusBar } from 'expo-status-bar';
|
||||
import { initializeI18n } from './src/i18n';
|
||||
import { ErrorBoundary } from './src/components/ErrorBoundary';
|
||||
import { LanguageProvider } from './src/contexts/LanguageContext';
|
||||
import { AuthProvider } from './src/contexts/AuthContext';
|
||||
import { PezkuwiProvider } from './src/contexts/PezkuwiContext';
|
||||
import { BiometricAuthProvider } from './src/contexts/BiometricAuthContext';
|
||||
import { ThemeProvider } from './src/contexts/ThemeContext';
|
||||
import AppNavigator from './src/navigation/AppNavigator';
|
||||
import { KurdistanColors } from './src/theme/colors';
|
||||
|
||||
export default function App() {
|
||||
const [isI18nInitialized, setIsI18nInitialized] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
// Initialize i18n on app start
|
||||
const initApp = async () => {
|
||||
try {
|
||||
console.log('🚀 App starting...');
|
||||
console.log('🔧 Initializing i18n...');
|
||||
await initializeI18n();
|
||||
console.log('✅ i18n initialized');
|
||||
setIsI18nInitialized(true);
|
||||
} catch (error) {
|
||||
console.error('❌ Failed to initialize i18n:', error);
|
||||
// Fallback: Still show app but with default language
|
||||
setIsI18nInitialized(true);
|
||||
}
|
||||
};
|
||||
|
||||
initApp();
|
||||
}, []);
|
||||
|
||||
if (!isI18nInitialized) {
|
||||
return (
|
||||
<View style={styles.loadingContainer}>
|
||||
<ActivityIndicator size="large" color={KurdistanColors.kesk} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<ThemeProvider>
|
||||
<AuthProvider>
|
||||
<PezkuwiProvider>
|
||||
<LanguageProvider>
|
||||
<BiometricAuthProvider>
|
||||
<StatusBar style="auto" />
|
||||
<AppNavigator />
|
||||
</BiometricAuthProvider>
|
||||
</LanguageProvider>
|
||||
<BiometricAuthProvider>
|
||||
<StatusBar style="auto" />
|
||||
<AppNavigator />
|
||||
</BiometricAuthProvider>
|
||||
</PezkuwiProvider>
|
||||
</AuthProvider>
|
||||
</ThemeProvider>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loadingContainer: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: KurdistanColors.spi,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user