feat(mobile): add complete consent flow (banner, health modal, privacy, i18n)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import React from 'react';
|
||||
import { View, Text, ScrollView, TouchableOpacity, StyleSheet } from 'react-native';
|
||||
import { useRouter } from 'expo-router';
|
||||
import { Ionicons } from '@expo/vector-icons';
|
||||
import { useThemeContext } from '../components/ThemeProvider';
|
||||
import { useTranslation } from '../src/i18n';
|
||||
import { spacing, borderRadius } from '../constants/theme';
|
||||
|
||||
const SECTIONS = ['controller', 'data_collected', 'purpose', 'legal_basis', 'external_services', 'retention', 'rights', 'contact', 'cookies'] as const;
|
||||
|
||||
export default function PrivacyScreen() {
|
||||
const router = useRouter();
|
||||
const { colors } = useThemeContext();
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<ScrollView style={[styles.container, { backgroundColor: colors.background }]}>
|
||||
<View style={styles.header}>
|
||||
<TouchableOpacity onPress={() => router.back()} style={[styles.backBtn, { backgroundColor: colors.card }]}>
|
||||
<Ionicons name="arrow-back" size={20} color={colors.text} />
|
||||
</TouchableOpacity>
|
||||
<Text style={[styles.title, { color: colors.text }]}>{t('privacy.title')}</Text>
|
||||
</View>
|
||||
<Text style={[styles.updated, { color: colors.textSecondary }]}>{t('privacy.last_updated')}</Text>
|
||||
{SECTIONS.map(section => (
|
||||
<View key={section} style={[styles.section, { backgroundColor: colors.card }]}>
|
||||
<Text style={[styles.sectionTitle, { color: colors.text }]}>{t(`privacy.section.${section}.title`)}</Text>
|
||||
<Text style={[styles.sectionContent, { color: colors.textSecondary }]}>{t(`privacy.section.${section}.content`)}</Text>
|
||||
</View>
|
||||
))}
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: { flex: 1, padding: spacing.md },
|
||||
header: { flexDirection: 'row', alignItems: 'center', gap: 12, marginBottom: 16 },
|
||||
backBtn: { width: 36, height: 36, borderRadius: borderRadius.md, justifyContent: 'center', alignItems: 'center' },
|
||||
title: { fontSize: 22, fontWeight: '700' },
|
||||
updated: { fontSize: 12, marginBottom: 16 },
|
||||
section: { borderRadius: borderRadius.md, padding: 16, marginBottom: 12 },
|
||||
sectionTitle: { fontSize: 16, fontWeight: '700', marginBottom: 8 },
|
||||
sectionContent: { fontSize: 14, lineHeight: 22 },
|
||||
});
|
||||
Reference in New Issue
Block a user