import { Tabs } from 'expo-router'; import React from 'react'; import { Platform } from 'react-native'; import { Feather } from '@expo/vector-icons'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { HapticTab } from '@/components/haptic-tab'; import { AppColors } from '@/constants/theme'; import { useColorScheme } from '@/hooks/use-color-scheme'; export default function TabLayout() { const colorScheme = useColorScheme(); const isDark = colorScheme === 'dark'; const insets = useSafeAreaInsets(); // Calculate tab bar height based on safe area // On iOS with home indicator, insets.bottom is ~34px // On Android with gesture navigation or software buttons (Samsung/Pixel): // - insets.bottom should reflect the navigation bar height // - But some devices/modes may return 0, so we add a minimum for Android // Android minimum: 16px to ensure content doesn't touch system buttons const androidMinPadding = Platform.OS === 'android' ? 16 : 0; const bottomPadding = Math.max(insets.bottom, androidMinPadding, 10); const tabBarHeight = 60 + bottomPadding; // 60px for content + safe area padding return ( ( ), }} /> {/* Hide old dashboard - now index shows WebView dashboard */} {/* Chat with Julia AI */} ( ), }} /> ( ), }} /> {/* Hide explore tab */} {/* Audio Debug - hidden */} {/* Beneficiaries - hidden from tab bar but keeps tab bar visible */} ); }