import { ICustomTab, ITabs } from "@/components/_Interface/types"; import { GStyles } from "@/styles/global-styles"; import { Ionicons } from "@expo/vector-icons"; import { router } from "expo-router"; import React from "react"; import { Platform, Text, TouchableOpacity, View } from "react-native"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import { MainColor } from "@/constants/color-palet"; interface HomeTabsProps { tabs: ITabs[]; } const CustomTab = ({ icon, label, isActive, onPress }: ICustomTab) => ( {label} ); /** * Home Tabs Component dengan Safe Area handling * * Component ini menggunakan pattern yang sama dengan Expo Router Tabs * untuk konsistensi safe area di Android */ export default function HomeTabs({ tabs }: HomeTabsProps) { const insets = useSafeAreaInsets(); const paddingBottom = Platform.OS === "android" ? insets.bottom : 0; return ( {/* Tabs content */} {tabs.map((e) => ( { // eslint-disable-next-line no-unused-expressions e.disabled ? console.log("disabled") : router.push(e.path); }} /> ))} {/* Safe area padding untuk Android */} {Platform.OS === "android" && paddingBottom > 0 && ( )} ); }