@ -3,10 +3,7 @@ import { Image } from "react-native";
import { NavigationContainer } from "@react-navigation/native" ;
import { createNativeStackNavigator } from "@react-navigation/native-stack" ;
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs" ;
import {
Entypo ,
FontAwesome ,
} from "@expo/vector-icons" ;
import { Entypo , FontAwesome } from "@expo/vector-icons" ;
import OrderDetails from "../src/screens/OrderDetails" ;
import OrdersFollowUp from "../src/screens/OrdersFollowUp" ;
import { Dimensions } from "react-native" ;
@ -38,8 +35,11 @@ import homeActiveIcon from "./assets/home-active.png";
import videoActiveIcon from "./assets/video-active.png" ;
import videoDeactiveIcon from "./assets/video-deactive.png" ;
import bookDeactiveIcon from "./assets/book-deactive.png" ;
import bookActiveIcon from "./assets/book-active.png" ;
import testDeactiveIcon from "./assets/test-deactive.png" ;
import testActiveIcon from "./assets/test-active.png" ;
import profileActiveIcon from "./assets/profile-active.png" ;
import profileDeactiveIcon from "./assets/profile-deactive.png" ;
const width = Dimensions . get ( "window" ) . width ;
@ -60,51 +60,57 @@ const BottomTabNavigator = () => {
tabBarLabelStyle : {
fontSize : width / 34 ,
fontFamily : "regular" ,
transform : [ { translateY : - 7 } ]
transform : [ { translateY : - 7 } ] ,
} ,
tabBarShowLabel : true ,
// tabBarLabel : 'reza'
} }
>
< Tab . Screen
name = "ShoppingCartTab "
component = { ShoppingCart }
name = "Profile "
component = { Profile }
options = { {
title : 'سبد خرید' ,
tabBarIcon : ( { focused , color } ) => (
< FontAwesome
name = "shopping-cart"
size = { 32 }
color = { color }
/ >
) ,
title : "پروفایل" ,
tabBarIcon : ( { focused , color } ) =>
focused ? (
< Image
source = { profileActiveIcon }
style = { { width : 33 , height : 32 } }
/ >
) : (
< Image
source = { profileDeactiveIcon }
style = { { width : 33 , height : 32 } }
/ >
) ,
} }
/ >
< Tab . Screen
name = "Tests"
component = { Tests }
options = { {
title : 'آزمون' ,
tabBarIcon : ( { focused , color } ) => ( focused ?
< FontAwesome
name = "map"
size = { 27 }
color = { color }
/ > :
< Image
title : "آزمون" ,
tabBarIcon : ( { focused , color } ) =>
focused ? (
< Image
source = { testActiveIcon }
style = { { width : 33 , height : 32 } }
/ >
) : (
< Image
source = { testDeactiveIcon }
style = { { width : 33 , height : 32 } }
/ >
) ,
) ,
} }
/ >
< Tab . Screen
name = "VODTab"
component = { VODStackScreen }
options = { {
unmountOnExit : true ,
unmountOnBlur : true ,
title : "ویدئوها" ,
unmountOnExit : true ,
unmountOnBlur : true ,
title : "ویدئوها" ,
tabBarIcon : ( { focused , color } ) =>
focused ? (
< Image
@ -123,21 +129,26 @@ const BottomTabNavigator = () => {
name = "ProductsTab"
component = { ProductsStackScreen }
options = { {
title : 'کتاب ها' ,
tabBarIcon : ( { focused , color } ) => ( focused ?
< Entypo name = "shop" size = { focused ? 27 : 23 } color = { color } / > :
< Image
title : "کتاب ها" ,
tabBarIcon : ( { focused , color } ) =>
focused ? (
< Image
source = { bookActiveIcon }
style = { { width : 35 , height : 34 } }
/ >
) : (
< Image
source = { bookDeactiveIcon }
style = { { width : 35 , height : 34 } }
/ >
) ,
) ,
} }
/ >
< Tab . Screen
name = "HomeTab"
component = { HomeStackScreen }
options = { {
title : "خانه" ,
title : "خانه" ,
tabBarIcon : ( { focused , color } ) =>
focused ? (
< Image