You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

92 lines
2.3 KiB

import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { MaterialCommunityIcons } from "@expo/vector-icons";
import DataNavigator from "./DataNavigator";
import FeedNavigator from "./FeedNavigator";
import MessagesNavigator from "./MessagesNavigator";
import ForecastNavigator from "./ForecastNavigator";
import NewListingButton from "./NewListingButton";
import SharingDataOptionsNavigator from "./SharingDataOptionsNavigator";
const Tab = createBottomTabNavigator();
const AppNavigator = () => (
<Tab.Navigator style={{ backgroundColor: "white" }}>
<Tab.Screen
name="Home"
component={FeedNavigator}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons name="home" color={color} size={size} />
),
}}
/>
<Tab.Screen
name="Previsão"
component={ForecastNavigator}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons
name="check-circle"
color={color}
size={size}
/>
),
}}
/>
<Tab.Screen
name="SharingData"
component={SharingDataOptionsNavigator}
options={({ navigation }) => ({
tabBarButton: () => (
<NewListingButton
onPress={() =>
navigation.reset({
index: 0,
routes: [{ name: "SharingData" }],
})
}
/>
),
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons
name="plus-circle"
color={color}
size={size}
/>
),
})}
/>
<Tab.Screen
name="Notificação"
component={MessagesNavigator}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons
name="bell-outline"
color={color}
size={size}
/>
),
}}
/>
<Tab.Screen
name="Dados"
component={DataNavigator}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons
name="layers-triple"
color={color}
size={size}
/>
),
}}
/>
</Tab.Navigator>
);
export default AppNavigator;