|
| 1 | +import store from '../redux/store'; |
1 | 2 | import AntDesign from '@expo/vector-icons/AntDesign';
|
2 | 3 | import Ionicons from '@expo/vector-icons/Ionicons';
|
3 | 4 | import { Tabs } from 'expo-router';
|
4 | 5 | import { StatusBar } from 'expo-status-bar';
|
5 | 6 | import React from 'react';
|
6 | 7 | import { View } from 'react-native';
|
| 8 | +import { Provider } from 'react-redux'; |
7 | 9 |
|
8 | 10 | import BottomTabBar from '@/components/tabbar/BottomTabBar';
|
9 | 11 |
|
10 | 12 | const RootLayout = () => {
|
11 | 13 | return (
|
12 |
| - <View style={styles.container}> |
13 |
| - <StatusBar style="auto" /> |
14 |
| - <Tabs |
15 |
| - tabBar={(props) => <BottomTabBar {...props} />} |
16 |
| - screenOptions={{ |
17 |
| - headerShown: false, |
18 |
| - tabBarActiveTintColor: '#4B6BFB', |
19 |
| - tabBarInactiveTintColor: '#666666', |
20 |
| - }} |
21 |
| - > |
22 |
| - <Tabs.Screen |
23 |
| - name="recipients" |
24 |
| - options={{ |
25 |
| - title: 'Recipients', |
26 |
| - tabBarIcon: ({ color, size }) => ( |
27 |
| - <Ionicons name="people-outline" size={size} color={color} /> |
28 |
| - ), |
| 14 | + <Provider store={store}> |
| 15 | + <View style={styles.container}> |
| 16 | + <StatusBar style="auto" /> |
| 17 | + <Tabs |
| 18 | + tabBar={(props) => <BottomTabBar {...props} />} |
| 19 | + screenOptions={{ |
| 20 | + headerShown: false, |
| 21 | + tabBarActiveTintColor: '#4B6BFB', |
| 22 | + tabBarInactiveTintColor: '#666666', |
29 | 23 | }}
|
30 |
| - /> |
31 |
| - <Tabs.Screen |
32 |
| - name="(gifts)" |
33 |
| - options={{ |
34 |
| - title: 'Home', |
35 |
| - tabBarIcon: ({ color, size }) => ( |
36 |
| - <AntDesign name="home" size={size} color={color} /> |
37 |
| - ), |
38 |
| - }} |
39 |
| - /> |
40 |
| - <Tabs.Screen |
41 |
| - name="settings" |
42 |
| - options={{ |
43 |
| - title: 'Settings', |
44 |
| - tabBarIcon: ({ color, size }) => ( |
45 |
| - <AntDesign name="setting" size={size} color={color} /> |
46 |
| - ), |
47 |
| - }} |
48 |
| - /> |
49 |
| - </Tabs> |
50 |
| - </View> |
| 24 | + > |
| 25 | + <Tabs.Screen |
| 26 | + name="recipients" |
| 27 | + options={{ |
| 28 | + title: 'Recipients', |
| 29 | + tabBarIcon: ({ color, size }) => ( |
| 30 | + <Ionicons name="people-outline" size={size} color={color} /> |
| 31 | + ), |
| 32 | + }} |
| 33 | + /> |
| 34 | + <Tabs.Screen |
| 35 | + name="(gifts)" |
| 36 | + options={{ |
| 37 | + title: 'Home', |
| 38 | + tabBarIcon: ({ color, size }) => ( |
| 39 | + <AntDesign name="home" size={size} color={color} /> |
| 40 | + ), |
| 41 | + }} |
| 42 | + /> |
| 43 | + <Tabs.Screen |
| 44 | + name="settings" |
| 45 | + options={{ |
| 46 | + title: 'Settings', |
| 47 | + tabBarIcon: ({ color, size }) => ( |
| 48 | + <AntDesign name="setting" size={size} color={color} /> |
| 49 | + ), |
| 50 | + }} |
| 51 | + /> |
| 52 | + </Tabs> |
| 53 | + </View> |
| 54 | + </Provider> |
51 | 55 | );
|
52 | 56 | };
|
53 | 57 |
|
|
0 commit comments