2024-10-15 15:53:05 -05:00
|
|
|
import { Tabs } from "expo-router";
|
|
|
|
import { TabBarIcon } from "@/components/navigation/TabBarIcon";
|
|
|
|
import { Colors } from "@/constants/Colors";
|
|
|
|
import { useColorScheme } from "@/hooks/useColorScheme";
|
2024-10-15 08:27:18 -05:00
|
|
|
|
2024-10-15 15:53:05 -05:00
|
|
|
const TabLayout = () => {
|
|
|
|
const scheme = useColorScheme() ?? 'dark';
|
2024-10-15 08:27:18 -05:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Tabs
|
|
|
|
screenOptions={{
|
2024-10-15 15:53:05 -05:00
|
|
|
tabBarActiveTintColor: Colors[scheme].tint,
|
2024-10-25 16:57:25 -05:00
|
|
|
headerShown: false,
|
2024-10-15 15:53:05 -05:00
|
|
|
headerStyle: {
|
|
|
|
backgroundColor: Colors[scheme].background,
|
|
|
|
},
|
|
|
|
headerShadowVisible: false,
|
|
|
|
headerTintColor: Colors[scheme].tint,
|
|
|
|
tabBarStyle: {
|
|
|
|
backgroundColor: Colors[scheme].background,
|
|
|
|
borderTopColor: Colors[scheme].tint,
|
|
|
|
borderTopWidth: 1,
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
|
2024-10-15 08:27:18 -05:00
|
|
|
<Tabs.Screen
|
2024-10-15 15:53:05 -05:00
|
|
|
name='index'
|
2024-10-15 08:27:18 -05:00
|
|
|
options={{
|
|
|
|
title: 'Home',
|
|
|
|
tabBarIcon: ({ color, focused }) => (
|
2024-10-15 15:53:05 -05:00
|
|
|
<TabBarIcon name={focused ? 'home' : 'home-outline'} color={color} />
|
2024-10-15 08:27:18 -05:00
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
2024-10-15 15:53:05 -05:00
|
|
|
|
|
|
|
<Tabs.Screen
|
|
|
|
name='messages'
|
2024-10-15 08:27:18 -05:00
|
|
|
options={{
|
2024-10-25 16:57:25 -05:00
|
|
|
headerShown: true,
|
2024-10-15 15:53:05 -05:00
|
|
|
title: 'Messages',
|
2024-10-15 08:27:18 -05:00
|
|
|
tabBarIcon: ({ color, focused }) => (
|
2024-10-15 15:53:05 -05:00
|
|
|
<TabBarIcon name={focused ? 'chatbubbles' : 'chatbubbles-outline'} color={color} />
|
2024-10-15 08:27:18 -05:00
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
2024-10-15 15:53:05 -05:00
|
|
|
|
|
|
|
<Tabs.Screen
|
|
|
|
name='settings'
|
|
|
|
options={{
|
|
|
|
title: 'Settings',
|
|
|
|
tabBarIcon: ({ color, focused }) => (
|
|
|
|
<TabBarIcon name={focused ? 'settings' : 'settings-outline'} color={color} />
|
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
|
2024-10-15 08:27:18 -05:00
|
|
|
</Tabs>
|
|
|
|
);
|
2024-10-15 15:53:05 -05:00
|
|
|
};
|
|
|
|
export default TabLayout;
|