import { Steps } from '@/app/(tabs)/user-message'; import { ThemedText } from '@/components/ThemedText'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { ActivityIndicator, KeyboardAvoidingView, Platform, TextInput, TouchableOpacity, View } from 'react-native'; interface Props { setSteps: (steps: Steps) => void; username: string; setUsername: (username: string) => void; } export default function UserName(props: Props) { const { setSteps, username, setUsername } = props const { t } = useTranslation(); const [isLoading, setIsLoading] = useState(false) const [error, setError] = useState('') const handleUserName = () => { if (!username) { setError('Username is required') return; } setIsLoading(true) setSteps("look") setIsLoading(false) } return ( {/* Input container fixed at bottom */} {t('auth.userMessage.title', { ns: 'login' })} {error} {t('auth.userMessage.username', { ns: 'login' })} {isLoading ? ( ) : ( {t('auth.userMessage.next', { ns: 'login' })} )} ) }