99Odeshi's picture
import React, { useState } from 'react'; import { View, Text, StyleSheet, I18nManager, Button } from 'react-native'; import './i18n'; import { useTranslation } from 'react-i18next'; import SpinWheel from './components/SpinWheel'; import FakeForm from './components/FakeForm'; import Lesson from './components/Lesson'; export default function App() { const [spun, setSpun] = useState(false); const { t, i18n } = useTranslation(); return ( <View style={styles.container}> <Text style={styles.title}>🎯 {t('appTitle')}</Text> <Text style={styles.subtitle}>{t('appSubtitle')}</Text> <SpinWheel onFinish={() => setSpun(true)} /> {spun && ( <> <FakeForm /> <Lesson /> </> )} <View style={styles.langButtons}> <Button title="🇺🇸 English" onPress={() => i18n.changeLanguage('en')} /> <Button title="🇪🇸 Español" onPress={() => i18n.changeLanguage('es')} /> </View> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, padding: 20, justifyContent: 'center', backgroundColor: '#f8f8ff' }, title: { fontSize: 28, fontWeight: 'bold', textAlign: 'center', marginBottom: 10 }, subtitle: { fontSize: 18, textAlign: 'center', marginBottom: 20 }, langButtons: { flexDirection: 'row', justifyContent: 'space-around', marginTop: 30 } }); - Follow Up Deployment
b6ce234 verified