Use Pressable instead of TouchableOpacity for Back button
TouchableOpacity inside ScrollView sometimes doesn't respond. Pressable is more reliable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a830383128
commit
6e277ca940
@ -5,6 +5,7 @@ import {
|
|||||||
StyleSheet,
|
StyleSheet,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
|
Pressable,
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
RefreshControl,
|
RefreshControl,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
@ -278,8 +279,11 @@ export default function EquipmentStatusScreen() {
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* Back to Loved Ones Button - above action button */}
|
{/* Back to Loved Ones Button - above action button */}
|
||||||
<TouchableOpacity
|
<Pressable
|
||||||
style={styles.backToLovedOnesButton}
|
style={({ pressed }) => [
|
||||||
|
styles.backToLovedOnesButton,
|
||||||
|
pressed && { opacity: 0.7 }
|
||||||
|
]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
console.log('[EquipmentStatus] Back to Loved Ones pressed');
|
console.log('[EquipmentStatus] Back to Loved Ones pressed');
|
||||||
router.push('/(tabs)/beneficiaries');
|
router.push('/(tabs)/beneficiaries');
|
||||||
@ -287,7 +291,7 @@ export default function EquipmentStatusScreen() {
|
|||||||
>
|
>
|
||||||
<Ionicons name="people" size={20} color={AppColors.white} />
|
<Ionicons name="people" size={20} color={AppColors.white} />
|
||||||
<Text style={styles.backToLovedOnesText}>Back to My Loved Ones</Text>
|
<Text style={styles.backToLovedOnesText}>Back to My Loved Ones</Text>
|
||||||
</TouchableOpacity>
|
</Pressable>
|
||||||
|
|
||||||
{/* Action Button */}
|
{/* Action Button */}
|
||||||
<View style={styles.actionSection}>
|
<View style={styles.actionSection}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user