import IP from '@/assets/icons/svg/ip.svg'; import { checkAuthStatus } from '@/lib/auth'; import { useRouter } from 'expo-router'; import React, { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Text, TouchableOpacity, View } from 'react-native'; import { useSafeAreaInsets } from "react-native-safe-area-context"; export default function HomeScreen() { const router = useRouter(); const { t } = useTranslation(); const insets = useSafeAreaInsets(); const [isLoading, setIsLoading] = useState(true); useEffect(() => { setIsLoading(true); checkAuthStatus(router, () => { router.replace('/ask') }, false).then(() => { setIsLoading(false); }).catch(() => { setIsLoading(false); }); }, []); if (isLoading) { return ( 加载中... ); } return ( {/* 标题区域 */} {t('auth.welcomeAwaken.awaken', { ns: 'login' })} {"\n"} {t('auth.welcomeAwaken.your', { ns: 'login' })} {"\n"} {t('auth.welcomeAwaken.pm', { ns: 'login' })} {t('auth.welcomeAwaken.slogan', { ns: 'login' })} {/* Memo 形象区域 */} {/* 介绍文本 */} {t('auth.welcomeAwaken.gallery', { ns: 'login' })} {"\n"} {t('auth.welcomeAwaken.back', { ns: 'login' })} {/* 唤醒按钮 */} { router.push('/login') }} activeOpacity={0.8} > {t('auth.welcomeAwaken.awake', { ns: 'login' })} ); }