2025-01-28 08:19:46 -06:00
|
|
|
import { Tabs } from 'expo-router';
|
|
|
|
import React from 'react';
|
|
|
|
import { Platform } from 'react-native';
|
|
|
|
|
|
|
|
import { HapticTab } from '@/components/HapticTab';
|
|
|
|
import { IconSymbol } from '@/components/ui/IconSymbol';
|
|
|
|
import TabBarBackground from '@/components/ui/TabBarBackground';
|
|
|
|
import { Colors } from '@/constants/Colors';
|
|
|
|
import { useColorScheme } from '@/hooks/useColorScheme';
|
|
|
|
|
|
|
|
export default function TabLayout() {
|
|
|
|
const colorScheme = useColorScheme();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Tabs
|
|
|
|
screenOptions={{
|
|
|
|
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
|
|
|
|
headerShown: false,
|
|
|
|
tabBarButton: HapticTab,
|
|
|
|
tabBarBackground: TabBarBackground,
|
|
|
|
tabBarStyle: Platform.select({
|
|
|
|
ios: {
|
|
|
|
// Use a transparent background on iOS to show the blur effect
|
|
|
|
position: 'absolute',
|
|
|
|
},
|
|
|
|
default: {},
|
|
|
|
}),
|
2025-01-28 08:45:02 -06:00
|
|
|
}}
|
|
|
|
>
|
2025-01-28 08:19:46 -06:00
|
|
|
<Tabs.Screen
|
2025-01-28 08:45:02 -06:00
|
|
|
name='index'
|
2025-01-28 08:19:46 -06:00
|
|
|
options={{
|
|
|
|
title: 'Home',
|
2025-01-28 08:45:02 -06:00
|
|
|
tabBarIcon: ({ color }) => <IconSymbol size={28} name='house.fill' color={color} />,
|
2025-01-28 08:19:46 -06:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Tabs.Screen
|
2025-01-28 08:45:02 -06:00
|
|
|
name='explore'
|
2025-01-28 08:19:46 -06:00
|
|
|
options={{
|
|
|
|
title: 'Explore',
|
2025-01-28 08:45:02 -06:00
|
|
|
tabBarIcon: ({ color }) => <IconSymbol size={28} name='paperplane.fill' color={color} />,
|
2025-01-28 08:19:46 -06:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</Tabs>
|
|
|
|
);
|
|
|
|
}
|