a796bf8cae
Diagnosed via on-device debug: build_timeseries produces 3271 points correctly, but the installed wheel's write_activity has a silent exception path that skips writing the timeseries file. The workaround calls build_timeseries directly and writes the file if missing. Also moves useTheme import to @/ThemeContext across all tab screens.
35 lines
1.0 KiB
TypeScript
35 lines
1.0 KiB
TypeScript
import { Tabs } from 'expo-router';
|
|
import { useTheme } from '@/ThemeContext';
|
|
|
|
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>;
|
|
}
|