50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import { Tabs } from 'expo-router';
|
|
import React from 'react';
|
|
|
|
import { HapticTab } from '@/components/haptic-tab';
|
|
import { Colors } from '@/constants/theme';
|
|
import { useColorScheme } from '@/hooks/use-color-scheme';
|
|
import { FontAwesome5 } from '@expo/vector-icons';
|
|
|
|
export default function TabLayout() {
|
|
const colorScheme = useColorScheme();
|
|
|
|
return (
|
|
<Tabs
|
|
screenOptions={{
|
|
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
|
|
headerShown: false,
|
|
tabBarButton: HapticTab,
|
|
}}>
|
|
<Tabs.Screen
|
|
name="index"
|
|
options={{
|
|
title: 'Home',
|
|
tabBarIcon: ({ color }) => <FontAwesome5 name="home" size={22} color={color} />,
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="questions"
|
|
options={{
|
|
title: 'Questions',
|
|
tabBarIcon: ({ color }) => <FontAwesome5 name="question" size={22} color={color} />,
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="tests"
|
|
options={{
|
|
title: 'Tests',
|
|
tabBarIcon: ({ color }) => <FontAwesome5 name="file-alt" size={22} color={color} />,
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="me"
|
|
options={{
|
|
title: 'Me',
|
|
tabBarIcon: ({ color }) => <FontAwesome5 name="user" size={22} color={color} />,
|
|
}}
|
|
/>
|
|
</Tabs>
|
|
);
|
|
}
|