Files
streamyfin_mirror/app/(auth)/(tabs)/_layout.tsx
Fredrik Burmester 98880e05ec first commit
2024-07-31 23:19:47 +02:00

56 lines
1.5 KiB
TypeScript

import { router, Tabs } from "expo-router";
import React from "react";
import { TabBarIcon } from "@/components/navigation/TabBarIcon";
import { Colors } from "@/constants/Colors";
import { TouchableOpacity } from "react-native";
import { Feather } from "@expo/vector-icons";
export default function TabLayout() {
return (
<Tabs
screenOptions={{
tabBarActiveTintColor: Colors.tabIconSelected,
headerShown: false,
}}
>
<Tabs.Screen
name="index"
options={{
headerShown: true,
headerStyle: { backgroundColor: "black" },
title: "Home",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "home" : "home-outline"}
color={color}
/>
),
headerRight: () => (
<TouchableOpacity
style={{ marginHorizontal: 17 }}
onPress={() => {
router.push("/(auth)/settings");
}}
>
<Feather name="settings" color={"white"} size={24} />
</TouchableOpacity>
),
}}
/>
<Tabs.Screen
name="search"
options={{
headerStyle: { backgroundColor: "black" },
headerShown: true,
title: "Search",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? "search" : "search"} color={color} />
),
}}
/>
</Tabs>
);
}