44 lines
1.3 KiB
TypeScript
44 lines
1.3 KiB
TypeScript
import { Tabs } from 'expo-router';
|
|
|
|
import { Colors } from '@/constants/Colors';
|
|
import { useColorScheme } from '@/hooks/useColorScheme';
|
|
import { TabBarIcon } from '@/components/navigation/TabBarIcon';
|
|
import { Provider } from 'react-redux';
|
|
import { products as fixtures } from "@/__fixtures__/initialProducts"
|
|
import { setupStore } from '../store';
|
|
|
|
export default function TabLayout() {
|
|
const colorScheme = useColorScheme();
|
|
const store = setupStore({
|
|
products: fixtures
|
|
});
|
|
return (
|
|
<Provider store={store}>
|
|
<Tabs
|
|
screenOptions={{
|
|
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
|
|
headerShown: false,
|
|
}}>
|
|
<Tabs.Screen
|
|
name="index"
|
|
options={{
|
|
title: 'Conversion',
|
|
tabBarIcon: ({ color, focused }) => (
|
|
<TabBarIcon name={focused ? 'recording' : 'recording-outline'} color={color} />
|
|
),
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="product-editor"
|
|
options={{
|
|
title: 'Products',
|
|
tabBarIcon: ({ color, focused }) => (
|
|
<TabBarIcon name={focused ? 'recording' : 'recording-outline'} color={color} />
|
|
),
|
|
}}
|
|
/>
|
|
</Tabs>
|
|
</Provider>
|
|
);
|
|
}
|