chahinebrini 14452b2a46 refactor(native): Pressable → TouchableOpacity sweep (style-fn swallows Android styles)
Alle <Pressable style={({pressed}) => ({...})}> ersetzt — style-Funktion
droppt auf Android (New Arch) intermittierend width/height, führt zu 0×0
unsichtbaren Elementen. TouchableOpacity mit activeOpacity ist stabil.

Außerdem übrige Pressables (plain style) aus components/ und app/
migriert sowie zwei überschüssige </View>-Tags in chat.tsx + RoomCard.tsx
entfernt die TS-Fehler verursacht haben.

64 Dateien, typecheck sauber.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 15:43:10 +02:00

47 lines
1.9 KiB
TypeScript

import { View, Text, TouchableOpacity } from 'react-native';
import { useRouter } from 'expo-router';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useTranslation } from 'react-i18next';
/**
* Shown when the backend returns a device-limit error (HTTP 403 with device_limit_reached).
* Phase 2: static info + redirect to sign-in.
* Phase 4+: integrate with device-management store to show active devices + revoke option.
*/
export default function DeviceLimitScreen() {
const router = useRouter();
const { t } = useTranslation();
return (
<SafeAreaView className="flex-1 bg-white">
<View className="flex-1 items-center justify-center px-6 text-center">
<Text className="text-5xl mb-4" style={{ fontFamily: 'Nunito_400Regular' }}>&#x1F4F1;</Text>
<Text className="text-xl text-neutral-900 mb-3 text-center" style={{ fontFamily: 'Nunito_700Bold' }}>
{t('auth.deviceLimitTitle')}
</Text>
<Text className="text-sm text-neutral-500 text-center leading-6 max-w-xs mb-8" style={{ fontFamily: 'Nunito_400Regular' }}>
{t('auth.deviceLimitDesc')}
</Text>
{/* TODO Phase 4: device management — list active devices + revoke button */}
<TouchableOpacity
onPress={() => router.replace('/signin')}
activeOpacity={0.8}
className="bg-rebreak-500 px-8 py-4 rounded-xl"
>
<Text className="text-white text-base" style={{ fontFamily: 'Nunito_600SemiBold' }}>{t('auth.toLogin')}</Text>
</TouchableOpacity>
<TouchableOpacity
onPress={() => router.push('/signin')}
activeOpacity={0.7}
className="py-3 mt-2"
>
<Text className="text-neutral-500 text-sm" style={{ fontFamily: 'Nunito_400Regular' }}>{t('auth.deviceLimitUpgrade')}</Text>
</TouchableOpacity>
</View>
</SafeAreaView>
);
}