resetSuccessful.tsx 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { View, Text, StyleSheet, Image } from 'react-native';
  2. import { router } from 'expo-router';
  3. import { SafeAreaView } from 'react-native-safe-area-context';
  4. import NormalButton from '../../../global/normal_button';
  5. import { useTranslation } from 'react-i18next'; // 添加国际化支持
  6. const ResetSuccessful = ({}) => {
  7. const { t } = useTranslation(); // 使用翻译钩子
  8. return (
  9. <SafeAreaView className="flex-1">
  10. <View className="flex-1 justify-center">
  11. <View className="items-center space-y-6">
  12. <Text style={styles.titleText}>{t('forgotPassword.two.success_title')}</Text>
  13. <Text style={styles.text}>{t('forgotPassword.two.welcome_message')}</Text>
  14. <Text style={styles.text}>{t('forgotPassword.two.good_luck')}</Text>
  15. </View>
  16. <Image
  17. style={{
  18. alignSelf: 'center'
  19. }}
  20. source={require('../../../../assets/successLogo.png')}
  21. />
  22. <View className="mx-[5%]">
  23. <NormalButton
  24. onPress={() => router.replace('login')}
  25. title={<Text className="text-white">{t('forgotPassword.two.finish')}</Text>}
  26. />
  27. </View>
  28. </View>
  29. </SafeAreaView>
  30. );
  31. };
  32. const styles = StyleSheet.create({
  33. titleText: { fontSize: 32, fontWeight: '400' },
  34. text: {
  35. fontSize: 18
  36. }
  37. });
  38. export default ResetSuccessful;