- Добавлены страницы Privacy Policy и Terms of Service - Обновлён chat и profile - Конфигурация для App Store submission
79 lines
2.0 KiB
TypeScript
79 lines
2.0 KiB
TypeScript
import React from 'react';
|
|
import { View, StyleSheet, TouchableOpacity, Text, ActivityIndicator } from 'react-native';
|
|
import { WebView } from 'react-native-webview';
|
|
import { router } from 'expo-router';
|
|
import { Ionicons } from '@expo/vector-icons';
|
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
import { AppColors, FontSizes, Spacing } from '@/constants/theme';
|
|
|
|
const PRIVACY_URL = 'https://wellnuo.com/privacy';
|
|
|
|
export default function PrivacyScreen() {
|
|
const [loading, setLoading] = React.useState(true);
|
|
|
|
return (
|
|
<SafeAreaView style={styles.container} edges={['top']}>
|
|
<View style={styles.header}>
|
|
<TouchableOpacity style={styles.backButton} onPress={() => router.back()}>
|
|
<Ionicons name="arrow-back" size={24} color={AppColors.textPrimary} />
|
|
</TouchableOpacity>
|
|
<Text style={styles.title}>Privacy Policy</Text>
|
|
<View style={styles.placeholder} />
|
|
</View>
|
|
|
|
{loading && (
|
|
<View style={styles.loadingContainer}>
|
|
<ActivityIndicator size="large" color={AppColors.primary} />
|
|
</View>
|
|
)}
|
|
|
|
<WebView
|
|
source={{ uri: PRIVACY_URL }}
|
|
style={styles.webview}
|
|
onLoadEnd={() => setLoading(false)}
|
|
startInLoadingState={false}
|
|
/>
|
|
</SafeAreaView>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
backgroundColor: AppColors.background,
|
|
},
|
|
header: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
justifyContent: 'space-between',
|
|
paddingHorizontal: Spacing.md,
|
|
paddingVertical: Spacing.sm,
|
|
borderBottomWidth: 1,
|
|
borderBottomColor: AppColors.border,
|
|
},
|
|
backButton: {
|
|
padding: Spacing.xs,
|
|
},
|
|
title: {
|
|
fontSize: FontSizes.lg,
|
|
fontWeight: '600',
|
|
color: AppColors.textPrimary,
|
|
},
|
|
placeholder: {
|
|
width: 32,
|
|
},
|
|
loadingContainer: {
|
|
position: 'absolute',
|
|
top: 80,
|
|
left: 0,
|
|
right: 0,
|
|
bottom: 0,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
zIndex: 1,
|
|
},
|
|
webview: {
|
|
flex: 1,
|
|
},
|
|
});
|