dfe5307ab4
- 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
35 lines
1.0 KiB
TypeScript
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>;
|
|
}
|