2024-10-08 16:58:50 -05:00
|
|
|
import { Tabs } from "expo-router";
|
|
|
|
import { TabBarIcon } from '@/components/default/navigation/TabBarIcon';
|
2024-10-08 12:25:29 -05:00
|
|
|
import { Colors } from '@/constants/Colors';
|
|
|
|
import { useColorScheme } from '@/hooks/useColorScheme';
|
|
|
|
|
2024-10-08 16:58:50 -05:00
|
|
|
const TabLayout = () => {
|
|
|
|
const scheme = useColorScheme() ?? 'light';
|
2024-10-08 12:25:29 -05:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Tabs
|
|
|
|
screenOptions={{
|
2024-10-08 16:58:50 -05:00
|
|
|
tabBarActiveTintColor: Colors[scheme].tint,
|
2024-10-08 12:25:29 -05:00
|
|
|
headerShown: false,
|
2024-10-08 16:58:50 -05:00
|
|
|
headerStyle: {
|
|
|
|
backgroundColor: Colors[scheme].background,
|
|
|
|
},
|
|
|
|
headerShadowVisible: false,
|
|
|
|
headerTintColor: Colors[scheme].tint,
|
|
|
|
tabBarStyle: {
|
|
|
|
backgroundColor: Colors[scheme].background,
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
2024-10-08 12:25:29 -05:00
|
|
|
<Tabs.Screen
|
2024-10-08 16:58:50 -05:00
|
|
|
name='index'
|
2024-10-08 12:25:29 -05:00
|
|
|
options={{
|
|
|
|
title: 'Home',
|
|
|
|
tabBarIcon: ({ color, focused }) => (
|
|
|
|
<TabBarIcon name={focused ? 'home' : 'home-outline'} color={color} />
|
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Tabs.Screen
|
2024-10-08 16:58:50 -05:00
|
|
|
name='settings'
|
2024-10-08 12:25:29 -05:00
|
|
|
options={{
|
2024-10-08 16:58:50 -05:00
|
|
|
title: 'Settings',
|
2024-10-08 12:25:29 -05:00
|
|
|
tabBarIcon: ({ color, focused }) => (
|
2024-10-08 16:58:50 -05:00
|
|
|
<TabBarIcon name={focused ? 'settings' : 'settings-outline'} color={color} />
|
2024-10-08 12:25:29 -05:00
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</Tabs>
|
|
|
|
);
|
2024-10-08 16:58:50 -05:00
|
|
|
};
|
|
|
|
export default TabLayout;
|