2024-05-08 21:18:47 +02:00
|
|
|
import React from "react";
|
|
|
|
import FontAwesome from "@expo/vector-icons/FontAwesome";
|
|
|
|
import MaterialIcons from "@expo/vector-icons/MaterialIcons";
|
|
|
|
import { Tabs } from "expo-router";
|
|
|
|
import { StyleSheet, View } from "react-native";
|
|
|
|
import { colors } from "@components/style";
|
|
|
|
import { StatusBar } from "expo-status-bar";
|
|
|
|
|
|
|
|
export default function TabLayout() {
|
|
|
|
return (
|
|
|
|
<View style={{ flex: 1 }}>
|
|
|
|
<StatusBar style="light" />
|
|
|
|
<Tabs
|
|
|
|
screenOptions={{
|
|
|
|
headerStyle: {
|
|
|
|
backgroundColor: colors.dark,
|
|
|
|
},
|
|
|
|
headerTintColor: "white",
|
|
|
|
tabBarStyle: {
|
|
|
|
backgroundColor: colors.darkSecondary,
|
|
|
|
},
|
|
|
|
tabBarActiveTintColor: colors.gold,
|
2024-05-08 23:39:49 +02:00
|
|
|
headerShown: true,
|
2024-05-08 21:18:47 +02:00
|
|
|
}}
|
|
|
|
sceneContainerStyle={{ backgroundColor: colors.dark }}
|
|
|
|
>
|
|
|
|
<Tabs.Screen
|
|
|
|
name="index"
|
|
|
|
options={{
|
|
|
|
title: "Home",
|
|
|
|
tabBarIcon: ({ color }) => (
|
|
|
|
<FontAwesome size={28} name="home" color={color} />
|
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Tabs.Screen
|
|
|
|
name="beer/index"
|
|
|
|
options={{
|
|
|
|
title: "Beers",
|
|
|
|
tabBarIcon: ({ color }) => (
|
|
|
|
<FontAwesome size={28} name="beer" color={color} />
|
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Tabs.Screen
|
2024-05-14 22:47:13 +02:00
|
|
|
name="review/index"
|
2024-05-08 21:18:47 +02:00
|
|
|
options={{
|
|
|
|
title: "Reviews",
|
|
|
|
tabBarIcon: ({ color }) => (
|
|
|
|
<MaterialIcons size={28} name="reviews" color={color} />
|
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Tabs.Screen
|
|
|
|
name="settings"
|
|
|
|
options={{
|
|
|
|
title: "Settings",
|
|
|
|
tabBarIcon: ({ color }) => (
|
|
|
|
<FontAwesome size={28} name="cog" color={color} />
|
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
|
|
|
|
{/* Hide following routes from bottom bar */}
|
2024-05-08 23:39:49 +02:00
|
|
|
<Tabs.Screen
|
|
|
|
name="beer/add"
|
|
|
|
options={{ href: null, title: "Add beer" }}
|
|
|
|
/>
|
2024-05-14 22:47:13 +02:00
|
|
|
<Tabs.Screen
|
2024-05-15 01:35:52 +02:00
|
|
|
name="review/add/[beer_id]"
|
2024-05-14 22:47:13 +02:00
|
|
|
options={{ href: null, title: "Add review" }}
|
|
|
|
/>
|
2024-05-08 21:18:47 +02:00
|
|
|
</Tabs>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|