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