feat: add centered quick-add item button in bottom nav
This commit is contained in:
@@ -727,6 +727,14 @@ export default function AppRoot() {
|
||||
}, 80);
|
||||
}
|
||||
|
||||
function openQuickAddItemFromNav() {
|
||||
if (!selectedTripId) {
|
||||
showAlert('No trip selected', 'Please select or create a trip first.');
|
||||
return;
|
||||
}
|
||||
openAddItemModal();
|
||||
}
|
||||
|
||||
if (!loaded) {
|
||||
return (
|
||||
<SafeAreaView style={[styles.safe, { paddingTop: topInset }]}>
|
||||
@@ -817,7 +825,7 @@ export default function AppRoot() {
|
||||
</ScrollView>
|
||||
</KeyboardAvoidingView>
|
||||
|
||||
<BottomTab current={tab} onChange={setTab} />
|
||||
<BottomTab current={tab} onChange={setTab} onAddItem={openQuickAddItemFromNav} canAddItem={!!selectedTripId} />
|
||||
|
||||
<DatePickerModal
|
||||
visible={datePicker.visible}
|
||||
|
||||
Reference in New Issue
Block a user