Files
bincio-activity/mobile/app/(tabs)/_layout.tsx
T
Davide Scaini dfe5307ab4 feat: seasonal race palette (Giro/Tour/Vuelta) + mobile picker
- theme.ts: useTheme() hook with race calendar (May–Sep windows),
  auto-detects Giro/Tour/Vuelta by date; stores override in SQLite
- All screens (feed, import, activity, tab bar) now use accent/dim
  from useTheme() instead of hardcoded #60a5fa
- Settings: Palette section with Auto/Default/Giro/Tour/Vuelta buttons
  to override the auto-detected palette for testing
2026-04-25 15:41:20 +02:00

35 lines
1.0 KiB
TypeScript

import { Tabs } from 'expo-router';
import { useTheme } from '@/theme';
export default function TabLayout() {
const theme = useTheme();
return (
<Tabs
screenOptions={{
headerShown: false,
tabBarStyle: { backgroundColor: '#18181b', borderTopColor: '#27272a' },
tabBarActiveTintColor: theme.accent,
tabBarInactiveTintColor: '#71717a',
}}
>
<Tabs.Screen
name="index"
options={{ title: 'Feed', tabBarIcon: ({ color }) => <TabIcon label="⬡" color={color} /> }}
/>
<Tabs.Screen
name="import"
options={{ title: 'Import', tabBarIcon: ({ color }) => <TabIcon label="↑" color={color} /> }}
/>
<Tabs.Screen
name="settings"
options={{ title: 'Settings', tabBarIcon: ({ color }) => <TabIcon label="⚙" color={color} /> }}
/>
</Tabs>
);
}
function TabIcon({ label, color }: { label: string; color: string }) {
const { Text } = require('react-native');
return <Text style={{ color, fontSize: 18 }}>{label}</Text>;
}