Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit b71d831

Browse files
committed
update: apply redux for all app
1 parent 5a6f228 commit b71d831

File tree

1 file changed

+42
-38
lines changed

1 file changed

+42
-38
lines changed

src/app/_layout.tsx

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,57 @@
1+
import store from '../redux/store';
12
import AntDesign from '@expo/vector-icons/AntDesign';
23
import Ionicons from '@expo/vector-icons/Ionicons';
34
import { Tabs } from 'expo-router';
45
import { StatusBar } from 'expo-status-bar';
56
import React from 'react';
67
import { View } from 'react-native';
8+
import { Provider } from 'react-redux';
79

810
import BottomTabBar from '@/components/tabbar/BottomTabBar';
911

1012
const RootLayout = () => {
1113
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',
2923
}}
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>
5155
);
5256
};
5357

0 commit comments

Comments
 (0)