import React from "react"; import Button from "./button"; import FontAwesome from "react-native-vector-icons/FontAwesome"; import Fontisto from "react-native-vector-icons/Fontisto"; import Box from "./Ekranlar/box"; import { Ara } from "../Sayfalar/ikonlar"; function TabBar({ state, descriptors, navigation }) { return ( {state.routes.map((route, index) => { const { options } = descriptors[route.key]; const label = options.tabBarLabel !== undefined ? options.tabBarLabel : options.title !== undefined ? options.title : route.name; const isFocused = state.index === index; const onPress = () => { const event = navigation.emit({ type: "tabPress", target: route.key, canPreventDefault: true, }); if (!isFocused && !event.defaultPrevented) { // The `merge: true` option makes sure that the params inside the tab screen are preserved navigation.navigate({ name: route.name, merge: true }); } }; return label === "Search" ? ( ) : ( ); })} ); } export default TabBar;