| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import { Tabs } from 'expo-router';
- import React from 'react';
- 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';
- import { useTranslation } from '@/localization/i18n';
- export default function TabLayout() {
- const colorScheme = useColorScheme();
- const { t } = useTranslation();
- return (
- <Tabs
- screenOptions={{
- tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
- headerShown: false,
- tabBarButton: HapticTab,
- }}>
- <Tabs.Screen
- name="index"
- options={{
- title: t('tabs.home'),
- tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
- }}
- />
- <Tabs.Screen
- name="logbook"
- options={{
- title: t('tabs.logbook'),
- headerShown: false,
- tabBarIcon: ({ color }) => <IconSymbol size={28} name="book.fill" color={color} />,
- }}
- />
- <Tabs.Screen
- name="explore"
- options={{
- href: null,
- }}
- />
- <Tabs.Screen
- name="blog"
- options={{
- title: t('tabs.blog'),
- tabBarIcon: ({ color }) => <IconSymbol size={28} name="doc.text.image" color={color} />,
- }}
- />
- <Tabs.Screen
- name="onnx"
- options={{
- title: t('tabs.onnx'),
- tabBarIcon: ({ color }) => <IconSymbol size={28} name="bolt.circle.fill" color={color} />,
- }}
- />
- <Tabs.Screen
- name="setup"
- options={{
- title: t('tabs.setup'),
- tabBarIcon: ({ color }) => <IconSymbol size={28} name="leaf.fill" color={color} />,
- }}
- />
- <Tabs.Screen name="observations" options={{ href: null }} />
- <Tabs.Screen name="harvests" options={{ href: null }} />
- <Tabs.Screen name="sales" options={{ href: null }} />
- <Tabs.Screen name="costs" options={{ href: null }} />
- <Tabs.Screen name="tasks" options={{ href: null }} />
- <Tabs.Screen
- name="task-history"
- options={{
- href: null,
- headerShown: true,
- title: t('tasks.historyTitle'),
- }}
- />
- </Tabs>
- );
- }
|