Files
life-echo/app-expo/src/app/(main)/about.tsx
Kevin 6d281c92a5 feat(app-expo): env variants, local iOS prebuild, and About diagnostics
Align staging/production builds with APP_VARIANT bundle IDs, allow staging HTTP on iOS, add ios-prebuild scripts for TestFlight, and show connected API URL on About for non-production builds.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 15:43:16 +08:00

47 lines
1.6 KiB
TypeScript

import Constants from 'expo-constants';
import React from 'react';
import { View } from 'react-native';
import { useTranslation } from 'react-i18next';
import { SafeAreaView } from 'react-native-safe-area-context';
import { Text } from '@/components/ui/text';
import { ScreenHeader } from '@/components/screen-header';
import { config } from '@/core/config';
export default function AboutScreen() {
const { t } = useTranslation('profile');
const version = Constants.expoConfig?.version ?? '1.0.0';
const showBackend = config.showAboutBackendUrl;
return (
<View className="flex-1 bg-background">
<ScreenHeader title={t('about.title')} />
<SafeAreaView className="flex-1 items-center justify-center gap-4 px-6">
<Text variant="h2" className="text-foreground">
{t('about.appName')}
</Text>
<Text className="text-muted-foreground">{t('about.appSubtitle')}</Text>
<Text className="text-sm text-muted-foreground">
{t('about.version', { version })}
</Text>
{showBackend ? (
<View className="w-full max-w-sm items-center gap-1">
<Text className="text-sm text-muted-foreground">
{t('about.backend')}
</Text>
<Text
selectable
className="text-center font-mono text-xs text-muted-foreground"
>
{config.apiBaseUrl}
</Text>
</View>
) : null}
<Text className="mt-8 text-center text-sm leading-5 text-muted-foreground">
{t('about.tagline')}
</Text>
</SafeAreaView>
</View>
);
}