63 lines
1.5 KiB
TypeScript
63 lines
1.5 KiB
TypeScript
import { Tabs } from "expo-router";
|
|
|
|
import { HapticTab } from "@/components/haptic-tab";
|
|
import { IconSymbol } from "@/components/ui/icon-symbol";
|
|
import { Colors } from "@/constants/theme";
|
|
import { useColorScheme } from "@/hooks/use-color-scheme";
|
|
|
|
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: "Giám sát",
|
|
tabBarIcon: ({ color }) => (
|
|
<IconSymbol size={28} name="map.fill" color={color} />
|
|
),
|
|
}}
|
|
/>
|
|
|
|
<Tabs.Screen
|
|
name="tripInfo"
|
|
options={{
|
|
title: "Chuyến Đi",
|
|
tabBarIcon: ({ color }) => (
|
|
<IconSymbol size={28} name="ferry.fill" color={color} />
|
|
),
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="warning"
|
|
options={{
|
|
title: "Cảnh báo",
|
|
tabBarIcon: ({ color }) => (
|
|
<IconSymbol
|
|
size={28}
|
|
name="exclamationmark.triangle.fill"
|
|
color={color}
|
|
/>
|
|
),
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="setting"
|
|
options={{
|
|
title: "Cài đặt",
|
|
tabBarIcon: ({ color }) => (
|
|
<IconSymbol size={28} name="gear" color={color} />
|
|
),
|
|
}}
|
|
/>
|
|
</Tabs>
|
|
);
|
|
}
|