fix: keep recipe-name sheet above keyboard (KeyboardAvoidingView), gps diagnostic logs

This commit is contained in:
2026-09-08 11:01:15 +07:00
parent 358f9b0f2f
commit 7d77be5029
2 changed files with 12 additions and 4 deletions
+8 -4
View File
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { View, Text, TouchableOpacity, TextInput, Modal } from 'react-native';
import { View, Text, TouchableOpacity, TextInput, Modal, KeyboardAvoidingView, Platform } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { Plus } from 'lucide-react-native';
import * as Haptics from 'expo-haptics';
@@ -60,8 +60,12 @@ export default function TopBar({ mode, recipeName, onSaveRecipe }: TopBarProps)
visible={modalVisible}
onRequestClose={() => setModalVisible(false)}
>
<View className="flex-1 justify-end bg-black/60">
<View style={{ paddingBottom: insets.bottom + 16 }} className="bg-titan border-t border-zinc-800 rounded-t-3xl p-6">
<View className="absolute inset-0 bg-black/60" />
<KeyboardAvoidingView
style={{ flex: 1 }}
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
>
<View style={{ paddingBottom: insets.bottom + 16 }} className="mt-auto bg-titan border-t border-zinc-800 rounded-t-3xl p-6">
<Text className="text-white font-mono text-sm font-bold tracking-wider mb-4">
SAVE CURRENT AS RECIPE
</Text>
@@ -89,7 +93,7 @@ export default function TopBar({ mode, recipeName, onSaveRecipe }: TopBarProps)
</TouchableOpacity>
</View>
</View>
</View>
</KeyboardAvoidingView>
</Modal>
</>
);