update navigation
This commit is contained in:
@@ -36,49 +36,10 @@ import CustomerInfo from '../screens/CustomerInfo';
|
||||
import { HeaderHome, HeaderCategory, HeaderProductDetail, HeaderAllOtherPage, HeaderLogin } from '../components/header/HeaderAllPage'
|
||||
|
||||
|
||||
const BottomTab = createBottomTabNavigator();
|
||||
export default function BottomTabNavigator() {
|
||||
export default function AllNavigator() {
|
||||
const colorScheme = useColorScheme();
|
||||
return (
|
||||
<BottomTab.Navigator
|
||||
initialRouteName="Trang chủ"
|
||||
tabBarOptions={{ activeTintColor: '#D8262F' }}>
|
||||
<BottomTab.Screen
|
||||
name="Trang chủ"
|
||||
component={AllStackNavigation}
|
||||
options={{
|
||||
tabBarIcon: ({ color }) => <TabBarIcon name="home-outline" color={color} />,
|
||||
}}
|
||||
/>
|
||||
<BottomTab.Screen
|
||||
name="Danh mục"
|
||||
component={MenuNavigation}
|
||||
options={{
|
||||
tabBarIcon: ({ color }) => <TabBarIcon name="apps-outline" color={color} />,
|
||||
}}
|
||||
/>
|
||||
<BottomTab.Screen
|
||||
name="Giỏ hàng"
|
||||
component={CartNavigation}
|
||||
options={{
|
||||
tabBarIcon: ({ color }) => <TabBarIcon name="cart-outline" color={color} />,
|
||||
}}
|
||||
/>
|
||||
<BottomTab.Screen
|
||||
name="Chat"
|
||||
component={ProductListNavigator}
|
||||
options={{
|
||||
tabBarIcon: ({ color }) => <TabBarIcon name="chatbubble-ellipses-outline" color={color} />,
|
||||
}}
|
||||
/>
|
||||
<BottomTab.Screen
|
||||
name="Tài khoản"
|
||||
component={AccountIndexNavigation}
|
||||
options={{
|
||||
tabBarIcon: ({ color }) => <TabBarIcon name="person-outline" color={color} />,
|
||||
}}
|
||||
/>
|
||||
</BottomTab.Navigator>
|
||||
<AllStackNavigation />
|
||||
);
|
||||
}
|
||||
|
||||
@@ -106,7 +67,8 @@ function HomePageNavigator({ navigation }: { navigation: any }) {
|
||||
headerStyle: {
|
||||
backgroundColor: '#fff',
|
||||
height: 100,
|
||||
}
|
||||
},
|
||||
animationEnabled: true,
|
||||
}}
|
||||
/>
|
||||
</HomepageStack.Navigator>
|
||||
@@ -603,7 +565,51 @@ function CustomerInfoNavigation() {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
const BottomTab = createBottomTabNavigator();
|
||||
function BottomTabNavigator() {
|
||||
const colorScheme = useColorScheme();
|
||||
return (
|
||||
<BottomTab.Navigator
|
||||
initialRouteName="Trang chủ"
|
||||
tabBarOptions={{ activeTintColor: '#D8262F' }}>
|
||||
<BottomTab.Screen
|
||||
name="Trang chủ"
|
||||
component={HomePageNavigator}
|
||||
options={{
|
||||
tabBarIcon: ({ color }) => <TabBarIcon name="home-outline" color={color} />,
|
||||
}}
|
||||
/>
|
||||
<BottomTab.Screen
|
||||
name="Danh mục"
|
||||
component={MenuNavigation}
|
||||
options={{
|
||||
tabBarIcon: ({ color }) => <TabBarIcon name="apps-outline" color={color} />,
|
||||
}}
|
||||
/>
|
||||
<BottomTab.Screen
|
||||
name="Giỏ hàng"
|
||||
component={CartNavigation}
|
||||
options={{
|
||||
tabBarIcon: ({ color }) => <TabBarIcon name="cart-outline" color={color} />,
|
||||
}}
|
||||
/>
|
||||
<BottomTab.Screen
|
||||
name="Chat"
|
||||
component={ProductListNavigator}
|
||||
options={{
|
||||
tabBarIcon: ({ color }) => <TabBarIcon name="chatbubble-ellipses-outline" color={color} />,
|
||||
}}
|
||||
/>
|
||||
<BottomTab.Screen
|
||||
name="Tài khoản"
|
||||
component={AccountIndexNavigation}
|
||||
options={{
|
||||
tabBarIcon: ({ color }) => <TabBarIcon name="person-outline" color={color} />,
|
||||
}}
|
||||
/>
|
||||
</BottomTab.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const AllStack = createStackNavigator();
|
||||
function AllStackNavigation() {
|
||||
@@ -611,7 +617,7 @@ function AllStackNavigation() {
|
||||
<AllStack.Navigator initialRouteName="Home">
|
||||
<AllStack.Screen
|
||||
name="Home"
|
||||
component={HomePageNavigator}
|
||||
component={BottomTabNavigator}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
@@ -654,6 +660,11 @@ function AllStackNavigation() {
|
||||
component={ProductSearchNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="ProductHotListNav"
|
||||
component={ProductHotListNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="Register"
|
||||
component={RegisterNavigation}
|
||||
|
||||
Reference in New Issue
Block a user