Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update: apply redux for all app
  • Loading branch information
htnghia1423 committed Apr 29, 2025
commit b71d831686c3e3b3c2a4b6c13e7bb5d7ea63b295
80 changes: 42 additions & 38 deletions src/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,57 @@
import store from '../redux/store';
import AntDesign from '@expo/vector-icons/AntDesign';
import Ionicons from '@expo/vector-icons/Ionicons';
import { Tabs } from 'expo-router';
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { View } from 'react-native';
import { Provider } from 'react-redux';

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

const RootLayout = () => {
return (
<View style={styles.container}>
<StatusBar style="auto" />
<Tabs
tabBar={(props) => <BottomTabBar {...props} />}
screenOptions={{
headerShown: false,
tabBarActiveTintColor: '#4B6BFB',
tabBarInactiveTintColor: '#666666',
}}
>
<Tabs.Screen
name="recipients"
options={{
title: 'Recipients',
tabBarIcon: ({ color, size }) => (
<Ionicons name="people-outline" size={size} color={color} />
),
<Provider store={store}>
<View style={styles.container}>
<StatusBar style="auto" />
<Tabs
tabBar={(props) => <BottomTabBar {...props} />}
screenOptions={{
headerShown: false,
tabBarActiveTintColor: '#4B6BFB',
tabBarInactiveTintColor: '#666666',
}}
/>
<Tabs.Screen
name="(gifts)"
options={{
title: 'Home',
tabBarIcon: ({ color, size }) => (
<AntDesign name="home" size={size} color={color} />
),
}}
/>
<Tabs.Screen
name="settings"
options={{
title: 'Settings',
tabBarIcon: ({ color, size }) => (
<AntDesign name="setting" size={size} color={color} />
),
}}
/>
</Tabs>
</View>
>
<Tabs.Screen
name="recipients"
options={{
title: 'Recipients',
tabBarIcon: ({ color, size }) => (
<Ionicons name="people-outline" size={size} color={color} />
),
}}
/>
<Tabs.Screen
name="(gifts)"
options={{
title: 'Home',
tabBarIcon: ({ color, size }) => (
<AntDesign name="home" size={size} color={color} />
),
}}
/>
<Tabs.Screen
name="settings"
options={{
title: 'Settings',
tabBarIcon: ({ color, size }) => (
<AntDesign name="setting" size={size} color={color} />
),
}}
/>
</Tabs>
</View>
</Provider>
);
};

Expand Down