|
|
|
@ -1,45 +1,45 @@ |
|
|
|
|
import React, { useEffect } from "react"; |
|
|
|
|
import React, {useEffect} from 'react'; |
|
|
|
|
// import { Restart } from "fiction-expo-restart";
|
|
|
|
|
import { I18nManager, StatusBar, Dimensions, Linking, View } from "react-native"; |
|
|
|
|
import Svg, { G, Path } from "react-native-svg"; |
|
|
|
|
import { asyncAwesomeAlert } from "../src/utils/AsyncWrappers"; |
|
|
|
|
import { NavigationContainer } from "@react-navigation/native"; |
|
|
|
|
import { createNativeStackNavigator } from "@react-navigation/native-stack"; |
|
|
|
|
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; |
|
|
|
|
import { connect } from "react-redux"; |
|
|
|
|
import { user, publicApi } from "../src/redux/actions"; |
|
|
|
|
import { useSafeAreaInsets } from "react-native-safe-area-context"; |
|
|
|
|
import {I18nManager, StatusBar, Dimensions, Linking, View} from 'react-native'; |
|
|
|
|
import Svg, {G, Path} from 'react-native-svg'; |
|
|
|
|
import {asyncAwesomeAlert} from '../src/utils/AsyncWrappers'; |
|
|
|
|
import {NavigationContainer} from '@react-navigation/native'; |
|
|
|
|
import {createNativeStackNavigator} from '@react-navigation/native-stack'; |
|
|
|
|
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; |
|
|
|
|
import {connect} from 'react-redux'; |
|
|
|
|
import {user, publicApi} from '../src/redux/actions'; |
|
|
|
|
import {useSafeAreaInsets} from 'react-native-safe-area-context'; |
|
|
|
|
|
|
|
|
|
//components
|
|
|
|
|
// import OrderDetails from "../src/screens/OrderDetails";
|
|
|
|
|
// import OrdersFollowUp from "../src/screens/OrdersFollowUp";
|
|
|
|
|
import Splash from "../src/screens/Splash"; |
|
|
|
|
import Home from "../src/screens/Home"; |
|
|
|
|
import Products from "../src/screens/Products"; |
|
|
|
|
import Login from "../src/screens/Login"; |
|
|
|
|
import Otp from "../src/screens/Otp"; |
|
|
|
|
// import Product from "../src/screens/Product";
|
|
|
|
|
import Splash from '../src/screens/Splash'; |
|
|
|
|
import Home from '../src/screens/Home'; |
|
|
|
|
import Products from '../src/screens/Products'; |
|
|
|
|
import Login from '../src/screens/Login'; |
|
|
|
|
import Otp from '../src/screens/Otp'; |
|
|
|
|
import Product from "../src/screens/Product"; |
|
|
|
|
// import AR from "../src/screens/AR";
|
|
|
|
|
// import QR from "../src/screens/QR";
|
|
|
|
|
// import QRContent from "../src/screens/QRContent";
|
|
|
|
|
// import Faq from "../src/screens/Faq";
|
|
|
|
|
// import Activation from "../src/screens/Activation";
|
|
|
|
|
// import Videos from "../src/screens/Videos";
|
|
|
|
|
import Videos from '../src/screens/Videos'; |
|
|
|
|
// import Video from "../src/screens/Video";
|
|
|
|
|
// import VideoDisplay from "../src/screens/VideoDisplay";
|
|
|
|
|
// import Contact from "../src/screens/Contact";
|
|
|
|
|
// import Tests from "../src/screens/Tests";
|
|
|
|
|
// import ShoppingCart from "../src/screens/ShoppingCart";
|
|
|
|
|
import ShoppingCart from '../src/screens/ShoppingCart'; |
|
|
|
|
// import DeliveryForm from "../src/screens/DeliveryForm";
|
|
|
|
|
// import Address from "../src/screens/Address";
|
|
|
|
|
// import Profile from "../src/screens/Profile";
|
|
|
|
|
import Profile from '../src/screens/Profile'; |
|
|
|
|
// import ProfileBookmark from "../src/screens/Profile/components/ProfileBookmark";
|
|
|
|
|
// import ProfileAddress from "../src/screens/Profile/components/ProfileAddress";
|
|
|
|
|
// import Blogs from "../src/screens/Blogs";
|
|
|
|
|
// import Blog from "../src/screens/Blog";
|
|
|
|
|
// import Sample from "../src/screens/Product/components/Sample";
|
|
|
|
|
// import Info from "../src/screens/Product/components/Info";
|
|
|
|
|
import Rules from "../src/screens/Rules/index"; |
|
|
|
|
import Rules from '../src/screens/Rules/index'; |
|
|
|
|
// import MyCourses from "../src/screens/Profile/components/MyCourses";
|
|
|
|
|
// import Ticket from "../src/screens/Contact/layouts/Ticket";
|
|
|
|
|
// import Tickets from "../src/screens/Contact/layouts/Tickets";
|
|
|
|
@ -47,8 +47,8 @@ import Rules from "../src/screens/Rules/index"; |
|
|
|
|
// import MoreBlog from "../src/screens/Blogs/layouts/More";
|
|
|
|
|
|
|
|
|
|
//style
|
|
|
|
|
import Colors from "./constants/Colors"; |
|
|
|
|
import fontSize from "./constants/fontSize"; |
|
|
|
|
import Colors from './constants/Colors'; |
|
|
|
|
import fontSize from './constants/fontSize'; |
|
|
|
|
|
|
|
|
|
const Tab = createBottomTabNavigator(); |
|
|
|
|
const BottomTabNavigator = ({ |
|
|
|
@ -73,31 +73,30 @@ const BottomTabNavigator = ({ |
|
|
|
|
headerShown, |
|
|
|
|
headerStyle: { |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
theme === 'light' ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
}, |
|
|
|
|
tabBarIconStyle: { |
|
|
|
|
transform: [{ scaleX: -1 }], |
|
|
|
|
transform: [{scaleX: -1}], |
|
|
|
|
}, |
|
|
|
|
tabBarLabelPosition: "below-icon", |
|
|
|
|
tabBarLabelPosition: 'below-icon', |
|
|
|
|
tabBarActiveTintColor: |
|
|
|
|
theme === "light" ? Colors.theme1.green79 : Colors.theme1.greenCF, |
|
|
|
|
theme === 'light' ? Colors.theme1.green79 : Colors.theme1.greenCF, |
|
|
|
|
tabBarInactiveTintColor: |
|
|
|
|
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.white, |
|
|
|
|
theme === 'light' ? Colors.theme1.gray20 : Colors.theme1.white, |
|
|
|
|
tabBarStyle: { |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
transform: [{ scaleX: -1 }], |
|
|
|
|
theme === 'light' ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
transform: [{scaleX: -1}], |
|
|
|
|
height: 65 + insets.bottom, |
|
|
|
|
borderWidth: 0, |
|
|
|
|
}, |
|
|
|
|
tabBarLabelStyle: { |
|
|
|
|
transform: [{ scaleX: -1 }, { translateY: -5 }], |
|
|
|
|
transform: [{scaleX: -1}, {translateY: -5}], |
|
|
|
|
fontSize: fontSize.xs, |
|
|
|
|
fontFamily: "Bold", |
|
|
|
|
fontFamily: 'Bold', |
|
|
|
|
}, |
|
|
|
|
tabBarShowLabel: true, |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
}}> |
|
|
|
|
{bottomNavigation.home.isActive ? ( |
|
|
|
|
<Tab.Screen |
|
|
|
|
name="HomeTab" |
|
|
|
@ -106,17 +105,16 @@ const BottomTabNavigator = ({ |
|
|
|
|
)} |
|
|
|
|
options={{ |
|
|
|
|
title: bottomNavigation.home.label, |
|
|
|
|
tabBarIcon: ({ focused, color }) => |
|
|
|
|
tabBarIcon: ({focused, color}) => |
|
|
|
|
focused ? ( |
|
|
|
|
<Svg |
|
|
|
|
xmlns="http://www.w3.org/2000/svg" |
|
|
|
|
width={33.58} |
|
|
|
|
height={33.579} |
|
|
|
|
> |
|
|
|
|
height={33.579}> |
|
|
|
|
<Path |
|
|
|
|
d="M12.62 3.974 5.079 9.85a6.658 6.658 0 0 0-2.281 4.645v10.368a5.912 5.912 0 0 0 5.89 5.9h16.2a5.909 5.909 0 0 0 5.89-5.89V14.691a6.609 6.609 0 0 0-2.518-4.827l-8.644-6.058a6.278 6.278 0 0 0-6.996.168Z" |
|
|
|
|
fill={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.greenCF |
|
|
|
|
} |
|
|
|
@ -125,7 +123,7 @@ const BottomTabNavigator = ({ |
|
|
|
|
data-name="Vector" |
|
|
|
|
d="M16.79 25.471v-6.693" |
|
|
|
|
fill="none" |
|
|
|
|
stroke={theme === "light" ? "#fff" : Colors.theme1.dark} |
|
|
|
|
stroke={theme === 'light' ? '#fff' : Colors.theme1.dark} |
|
|
|
|
strokeLinecap="round" |
|
|
|
|
strokeLinejoin="round" |
|
|
|
|
strokeWidth={2} |
|
|
|
@ -137,14 +135,13 @@ const BottomTabNavigator = ({ |
|
|
|
|
width={33.58} |
|
|
|
|
height={33.579} |
|
|
|
|
style={{ |
|
|
|
|
transform: [{ scale: 0.7 }], |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
transform: [{scale: 0.7}], |
|
|
|
|
}}> |
|
|
|
|
<Path |
|
|
|
|
d="M12.62 3.974 5.079 9.85a6.658 6.658 0 0 0-2.281 4.645v10.368a5.912 5.912 0 0 0 5.89 5.9h16.2a5.909 5.909 0 0 0 5.89-5.89V14.691a6.609 6.609 0 0 0-2.518-4.827l-8.644-6.058a6.278 6.278 0 0 0-6.996.168Z" |
|
|
|
|
fill="none" |
|
|
|
|
stroke={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.white |
|
|
|
|
} |
|
|
|
@ -157,7 +154,7 @@ const BottomTabNavigator = ({ |
|
|
|
|
d="M16.79 25.471v-6.693" |
|
|
|
|
fill="none" |
|
|
|
|
stroke={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.white |
|
|
|
|
} |
|
|
|
@ -177,17 +174,16 @@ const BottomTabNavigator = ({ |
|
|
|
|
children={() => <ProductsStackScreen theme={theme} />} |
|
|
|
|
options={{ |
|
|
|
|
title: bottomNavigation.products.label, |
|
|
|
|
tabBarIcon: ({ focused, color }) => |
|
|
|
|
tabBarIcon: ({focused, color}) => |
|
|
|
|
focused ? ( |
|
|
|
|
<Svg |
|
|
|
|
xmlns="http://www.w3.org/2000/svg" |
|
|
|
|
width={35.135} |
|
|
|
|
height={34.763} |
|
|
|
|
> |
|
|
|
|
height={34.763}> |
|
|
|
|
<Path |
|
|
|
|
d="M32.207 24.227V6.798a2.869 2.869 0 0 0-3.179-2.875h-.088a27.857 27.857 0 0 0-10.35 3.422l-.249.159a1.641 1.641 0 0 1-1.552 0l-.361-.216A27.72 27.72 0 0 0 6.09 3.909a2.864 2.864 0 0 0-3.162 2.874v17.444a2.981 2.981 0 0 0 2.547 2.859l.425.058a37.976 37.976 0 0 1 10.892 3.524l.059.029a1.6 1.6 0 0 0 1.405 0 37.631 37.631 0 0 1 10.921-3.552l.483-.058a2.981 2.981 0 0 0 2.547-2.86Z" |
|
|
|
|
fill={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.greenCF |
|
|
|
|
} |
|
|
|
@ -196,7 +192,7 @@ const BottomTabNavigator = ({ |
|
|
|
|
data-name="Vector" |
|
|
|
|
d="M17.567 8.851v20.774M29.213 12.298h-3.294M29.159 16.643h-4.392" |
|
|
|
|
fill="none" |
|
|
|
|
stroke={theme === "light" ? "#fff" : Colors.theme1.dark} |
|
|
|
|
stroke={theme === 'light' ? '#fff' : Colors.theme1.dark} |
|
|
|
|
strokeLinecap="round" |
|
|
|
|
strokeLinejoin="round" |
|
|
|
|
strokeWidth={2} |
|
|
|
@ -208,20 +204,18 @@ const BottomTabNavigator = ({ |
|
|
|
|
width={35.135} |
|
|
|
|
height={34.763} |
|
|
|
|
style={{ |
|
|
|
|
transform: [{ scale: 0.7 }], |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
transform: [{scale: 0.7}], |
|
|
|
|
}}> |
|
|
|
|
<G |
|
|
|
|
fill="none" |
|
|
|
|
stroke={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.white |
|
|
|
|
} |
|
|
|
|
strokeLinecap="round" |
|
|
|
|
strokeLinejoin="round" |
|
|
|
|
strokeWidth={2} |
|
|
|
|
> |
|
|
|
|
strokeWidth={2}> |
|
|
|
|
<Path d="M32.207 24.227V6.798a2.869 2.869 0 0 0-3.179-2.875h-.088a27.857 27.857 0 0 0-10.35 3.422l-.249.159a1.641 1.641 0 0 1-1.552 0l-.361-.216A27.72 27.72 0 0 0 6.09 3.909a2.864 2.864 0 0 0-3.162 2.874v17.444a2.981 2.981 0 0 0 2.547 2.859l.425.058a37.976 37.976 0 0 1 10.892 3.524l.059.029a1.6 1.6 0 0 0 1.405 0 37.631 37.631 0 0 1 10.921-3.552l.483-.058a2.981 2.981 0 0 0 2.547-2.86Z" /> |
|
|
|
|
<Path |
|
|
|
|
data-name="Vector" |
|
|
|
@ -242,23 +236,22 @@ const BottomTabNavigator = ({ |
|
|
|
|
unmountOnExit: true, |
|
|
|
|
unmountOnBlur: true, |
|
|
|
|
title: bottomNavigation.vod.label, |
|
|
|
|
tabBarIcon: ({ focused, color }) => |
|
|
|
|
tabBarIcon: ({focused, color}) => |
|
|
|
|
focused ? ( |
|
|
|
|
<Svg |
|
|
|
|
xmlns="http://www.w3.org/2000/svg" |
|
|
|
|
width={35} |
|
|
|
|
height={31.1} |
|
|
|
|
> |
|
|
|
|
height={31.1}> |
|
|
|
|
<G data-name="Group 2000"> |
|
|
|
|
<Path |
|
|
|
|
d="M25.421 29.241H8.974C4.04 29.241.75 26.392.75 19.744V10.25c0-6.651 3.29-9.5 8.224-9.5h16.447c4.935 0 8.229 2.849 8.229 9.5v9.5c0 6.642-3.294 9.491-8.229 9.491Z" |
|
|
|
|
fill={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.greenCF |
|
|
|
|
} |
|
|
|
|
stroke={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.greenCF |
|
|
|
|
} |
|
|
|
@ -271,7 +264,7 @@ const BottomTabNavigator = ({ |
|
|
|
|
data-name="Vector" |
|
|
|
|
d="M12.427 14.995v-2.083c0-2.673 1.892-3.766 4.2-2.43l1.805 1.042 1.806 1.041c2.308 1.336 2.308 3.523 0 4.86l-1.806 1.041-1.805 1.046c-2.308 1.332-4.2.239-4.2-2.434v-2.083Z" |
|
|
|
|
fill="none" |
|
|
|
|
stroke={theme === "light" ? "#fff" : Colors.theme1.dark} |
|
|
|
|
stroke={theme === 'light' ? '#fff' : Colors.theme1.dark} |
|
|
|
|
strokeLinecap="round" |
|
|
|
|
strokeLinejoin="round" |
|
|
|
|
strokeWidth={2} |
|
|
|
@ -284,15 +277,14 @@ const BottomTabNavigator = ({ |
|
|
|
|
width={35} |
|
|
|
|
height={32} |
|
|
|
|
style={{ |
|
|
|
|
transform: [{ scale: 0.7 }], |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
transform: [{scale: 0.7}], |
|
|
|
|
}}> |
|
|
|
|
<G data-name="Group 1999"> |
|
|
|
|
<Path |
|
|
|
|
d="M25.421 29.241H8.974C4.04 29.241.75 26.392.75 19.744V10.25c0-6.651 3.29-9.5 8.224-9.5h16.447c4.935 0 8.229 2.849 8.229 9.5v9.5c0 6.642-3.294 9.491-8.229 9.491Z" |
|
|
|
|
fill="none" |
|
|
|
|
stroke={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.white |
|
|
|
|
} |
|
|
|
@ -306,7 +298,7 @@ const BottomTabNavigator = ({ |
|
|
|
|
d="M12.427 14.995v-2.083c0-2.673 1.892-3.766 4.2-2.43l1.805 1.042 1.806 1.041c2.308 1.336 2.308 3.523 0 4.86l-1.806 1.041-1.805 1.046c-2.308 1.332-4.2.239-4.2-2.434v-2.083Z" |
|
|
|
|
fill="none" |
|
|
|
|
stroke={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.white |
|
|
|
|
} |
|
|
|
@ -326,48 +318,44 @@ const BottomTabNavigator = ({ |
|
|
|
|
name="ShoppingCartTab" |
|
|
|
|
children={() => <CARTStackScreen theme={theme} />} |
|
|
|
|
options={{ |
|
|
|
|
tabBarBadge: userProducts?.filter( |
|
|
|
|
(product) => product?.condition < 2 |
|
|
|
|
).length |
|
|
|
|
? userProducts?.filter((product) => product?.condition < 2) |
|
|
|
|
?.length |
|
|
|
|
tabBarBadge: userProducts?.filter(product => product?.condition < 2) |
|
|
|
|
.length |
|
|
|
|
? userProducts?.filter(product => product?.condition < 2)?.length |
|
|
|
|
: null, |
|
|
|
|
tabBarBadgeStyle: { |
|
|
|
|
color: "white", |
|
|
|
|
color: 'white', |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.greenCF |
|
|
|
|
: Colors.theme1.greenCF, |
|
|
|
|
fontSize: fontSize.sm, |
|
|
|
|
paddingTop: 2, |
|
|
|
|
color: |
|
|
|
|
theme === "light" ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
theme === 'light' ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: |
|
|
|
|
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.dark, |
|
|
|
|
fontFamily: "Bold", |
|
|
|
|
theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.dark, |
|
|
|
|
fontFamily: 'Bold', |
|
|
|
|
}, |
|
|
|
|
title: bottomNavigation.cart.label, |
|
|
|
|
tabBarIcon: ({ focused, color }) => |
|
|
|
|
tabBarIcon: ({focused, color}) => |
|
|
|
|
focused ? ( |
|
|
|
|
<Svg |
|
|
|
|
xmlns="http://www.w3.org/2000/svg" |
|
|
|
|
width={31.017} |
|
|
|
|
height={31.017} |
|
|
|
|
style={{ transform: [{ scale: 1.2 }] }} |
|
|
|
|
> |
|
|
|
|
style={{transform: [{scale: 1.2}]}}> |
|
|
|
|
<G |
|
|
|
|
fill={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.greenCF |
|
|
|
|
} |
|
|
|
|
stroke={theme === "light" ? "white" : Colors.theme1.dark} |
|
|
|
|
stroke={theme === 'light' ? 'white' : Colors.theme1.dark} |
|
|
|
|
strokeLinecap="round" |
|
|
|
|
strokeLinejoin="round" |
|
|
|
|
strokeWidth={2} |
|
|
|
|
data-name="vuesax/linear/bag-2" |
|
|
|
|
> |
|
|
|
|
data-name="vuesax/linear/bag-2"> |
|
|
|
|
<Path d="M9.693 9.912V8.659a6.168 6.168 0 0 1 5.247-6.036 5.816 5.816 0 0 1 6.384 5.79v1.782" /> |
|
|
|
|
<Path |
|
|
|
|
data-name="Vector" |
|
|
|
@ -381,21 +369,19 @@ const BottomTabNavigator = ({ |
|
|
|
|
width={31.017} |
|
|
|
|
height={31.017} |
|
|
|
|
style={{ |
|
|
|
|
transform: [{ scale: 0.8 }], |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
transform: [{scale: 0.8}], |
|
|
|
|
}}> |
|
|
|
|
<G |
|
|
|
|
fill="none" |
|
|
|
|
stroke={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.white |
|
|
|
|
} |
|
|
|
|
strokeLinecap="round" |
|
|
|
|
strokeLinejoin="round" |
|
|
|
|
strokeWidth={2} |
|
|
|
|
data-name="vuesax/linear/bag-2" |
|
|
|
|
> |
|
|
|
|
data-name="vuesax/linear/bag-2"> |
|
|
|
|
<Path d="M9.693 9.912V8.659a6.168 6.168 0 0 1 5.247-6.036 5.816 5.816 0 0 1 6.384 5.79v1.782" /> |
|
|
|
|
<Path |
|
|
|
|
data-name="Vector" |
|
|
|
@ -414,20 +400,18 @@ const BottomTabNavigator = ({ |
|
|
|
|
children={() => <PROFILEStackScreen theme={theme} />} |
|
|
|
|
options={{ |
|
|
|
|
title: bottomNavigation.profile.label, |
|
|
|
|
tabBarIcon: ({ focused, color }) => |
|
|
|
|
tabBarIcon: ({focused, color}) => |
|
|
|
|
focused ? ( |
|
|
|
|
<Svg |
|
|
|
|
xmlns="http://www.w3.org/2000/svg" |
|
|
|
|
width={31.192} |
|
|
|
|
height={31.192} |
|
|
|
|
> |
|
|
|
|
height={31.192}> |
|
|
|
|
<G |
|
|
|
|
fill={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.greenCF |
|
|
|
|
} |
|
|
|
|
> |
|
|
|
|
}> |
|
|
|
|
<Path d="M15.803 14.127a2.363 2.363 0 0 0-.429 0 5.777 5.777 0 1 1 .429 0Z" /> |
|
|
|
|
<Path |
|
|
|
|
data-name="Vector" |
|
|
|
@ -441,20 +425,18 @@ const BottomTabNavigator = ({ |
|
|
|
|
width={31.192} |
|
|
|
|
height={31.192} |
|
|
|
|
style={{ |
|
|
|
|
transform: [{ scale: 0.8 }], |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
transform: [{scale: 0.8}], |
|
|
|
|
}}> |
|
|
|
|
<G |
|
|
|
|
fill="none" |
|
|
|
|
stroke={ |
|
|
|
|
theme === "light" |
|
|
|
|
theme === 'light' |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.white |
|
|
|
|
} |
|
|
|
|
strokeLinecap="round" |
|
|
|
|
strokeLinejoin="round" |
|
|
|
|
strokeWidth={2} |
|
|
|
|
> |
|
|
|
|
strokeWidth={2}> |
|
|
|
|
<Path d="M15.803 14.127a2.363 2.363 0 0 0-.429 0 5.777 5.777 0 1 1 .429 0Z" /> |
|
|
|
|
<Path |
|
|
|
|
data-name="Vector" |
|
|
|
@ -464,7 +446,7 @@ const BottomTabNavigator = ({ |
|
|
|
|
</Svg> |
|
|
|
|
), |
|
|
|
|
contentStyle: { |
|
|
|
|
backgroundColor: "white", |
|
|
|
|
backgroundColor: 'white', |
|
|
|
|
}, |
|
|
|
|
}} |
|
|
|
|
/> |
|
|
|
@ -474,28 +456,28 @@ const BottomTabNavigator = ({ |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const HomeStack = createNativeStackNavigator(); |
|
|
|
|
const HomeStackScreen = ({ theme, startUserGuide }) => { |
|
|
|
|
const HomeStackScreen = ({theme, startUserGuide}) => { |
|
|
|
|
return ( |
|
|
|
|
<HomeStack.Navigator |
|
|
|
|
screenOptions={{ |
|
|
|
|
headerShown: false, |
|
|
|
|
contentStyle: { |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
theme === 'light' ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
}, |
|
|
|
|
unmountOnBlur: true, |
|
|
|
|
}} |
|
|
|
|
initialRouteName="Home" |
|
|
|
|
> |
|
|
|
|
initialRouteName="Home"> |
|
|
|
|
<HomeStack.Screen |
|
|
|
|
name="Home" |
|
|
|
|
children={() => <Home startUserGuide={startUserGuide} />} |
|
|
|
|
/> |
|
|
|
|
{/* <HomeStack.Screen name="VOD" component={Videos} /> |
|
|
|
|
<HomeStack.Screen name="Video" component={Video} unmountOnExit={true} /> |
|
|
|
|
<HomeStack.Screen name="VideoDisplay" component={VideoDisplay} /> |
|
|
|
|
<HomeStack.Screen name="Products" component={Products} /> |
|
|
|
|
<HomeStack.Screen name="VOD" component={Videos} /> |
|
|
|
|
<HomeStack.Screen name="Product" component={Product} /> |
|
|
|
|
{/* |
|
|
|
|
<HomeStack.Screen name="Video" component={Video} unmountOnExit={true} /> |
|
|
|
|
<HomeStack.Screen name="VideoDisplay" component={VideoDisplay} /> |
|
|
|
|
<HomeStack.Screen name="Sample" component={Sample} /> |
|
|
|
|
<HomeStack.Screen name="Blogs" component={Blogs} /> |
|
|
|
|
<HomeStack.Screen name="MoreBlog" component={MoreBlog} /> |
|
|
|
@ -506,21 +488,21 @@ const HomeStackScreen = ({ theme, startUserGuide }) => { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const ProductsStack = createNativeStackNavigator(); |
|
|
|
|
const ProductsStackScreen = ({ theme }) => { |
|
|
|
|
const ProductsStackScreen = ({theme}) => { |
|
|
|
|
return ( |
|
|
|
|
<ProductsStack.Navigator |
|
|
|
|
screenOptions={{ |
|
|
|
|
headerShown: false, |
|
|
|
|
contentStyle: { |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
theme === 'light' ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
}, |
|
|
|
|
unmountOnBlur: true, |
|
|
|
|
}} |
|
|
|
|
initialRouteName="Products" |
|
|
|
|
> |
|
|
|
|
initialRouteName="Products"> |
|
|
|
|
<ProductsStack.Screen name="Products" children={() => <Products />} /> |
|
|
|
|
{/* <ProductsStack.Screen name="Product" component={Product} /> |
|
|
|
|
<ProductsStack.Screen name="Product" component={Product} /> |
|
|
|
|
{/* |
|
|
|
|
<ProductsStack.Screen name="Sample" component={Sample} /> |
|
|
|
|
<ProductsStack.Screen name="Info" component={Info} /> */} |
|
|
|
|
</ProductsStack.Navigator> |
|
|
|
@ -528,20 +510,19 @@ const ProductsStackScreen = ({ theme }) => { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const VODStack = createNativeStackNavigator(); |
|
|
|
|
const VODStackScreen = ({ theme }) => { |
|
|
|
|
const VODStackScreen = ({theme}) => { |
|
|
|
|
return ( |
|
|
|
|
<VODStack.Navigator |
|
|
|
|
screenOptions={{ |
|
|
|
|
headerShown: false, |
|
|
|
|
contentStyle: { |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
theme === 'light' ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
}, |
|
|
|
|
unmountOnBlur: true, |
|
|
|
|
}} |
|
|
|
|
initialRouteName="VOD" |
|
|
|
|
> |
|
|
|
|
<VODStack.Screen name="VOD" children={() => <View></View>} /> |
|
|
|
|
initialRouteName="VOD"> |
|
|
|
|
<VODStack.Screen name="VOD" children={() => <Videos />} /> |
|
|
|
|
{/* <VODStack.Screen name="Video" component={Video} unmountOnExit={true} /> |
|
|
|
|
<VODStack.Screen name="VideoDisplay" component={VideoDisplay} /> */} |
|
|
|
|
</VODStack.Navigator> |
|
|
|
@ -549,20 +530,19 @@ const VODStackScreen = ({ theme }) => { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const CARTStack = createNativeStackNavigator(); |
|
|
|
|
const CARTStackScreen = ({ theme }) => { |
|
|
|
|
const CARTStackScreen = ({theme}) => { |
|
|
|
|
return ( |
|
|
|
|
<CARTStack.Navigator |
|
|
|
|
screenOptions={{ |
|
|
|
|
headerShown: false, |
|
|
|
|
contentStyle: { |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
theme === 'light' ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
}, |
|
|
|
|
unmountOnBlur: true, |
|
|
|
|
}} |
|
|
|
|
initialRouteName="ShoppingCart" |
|
|
|
|
> |
|
|
|
|
<CARTStack.Screen name="ShoppingCart" children={() => <View></View>} /> |
|
|
|
|
initialRouteName="ShoppingCart"> |
|
|
|
|
<CARTStack.Screen name="ShoppingCart" children={() => <ShoppingCart />} /> |
|
|
|
|
{/* <CARTStack.Screen name="DeliveryForm" component={DeliveryForm} /> |
|
|
|
|
<CARTStack.Screen name="Info" component={Info} /> */} |
|
|
|
|
</CARTStack.Navigator> |
|
|
|
@ -570,22 +550,23 @@ const CARTStackScreen = ({ theme }) => { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const PROFILEStack = createNativeStackNavigator(); |
|
|
|
|
const PROFILEStackScreen = ({ theme }) => { |
|
|
|
|
const PROFILEStackScreen = ({theme}) => { |
|
|
|
|
return ( |
|
|
|
|
<PROFILEStack.Navigator |
|
|
|
|
screenOptions={{ |
|
|
|
|
headerShown: false, |
|
|
|
|
contentStyle: { |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
theme === 'light' ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
}, |
|
|
|
|
unmountOnBlur: true, |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
<PROFILEStack.Screen name="Profile" children={() => <View></View>} /> |
|
|
|
|
{/* <PROFILEStack.Screen name="ProfileBookmark" component={ProfileBookmark} /> |
|
|
|
|
}}> |
|
|
|
|
<PROFILEStack.Screen name="Profile" children={() => <Profile />} /> |
|
|
|
|
<PROFILEStack.Screen name="Products" component={Products} /> |
|
|
|
|
<PROFILEStack.Screen name="Product" component={Product} /> |
|
|
|
|
{/* |
|
|
|
|
<PROFILEStack.Screen name="ProfileBookmark" component={ProfileBookmark} /> |
|
|
|
|
|
|
|
|
|
<PROFILEStack.Screen name="Blogs" component={Blogs} /> |
|
|
|
|
<PROFILEStack.Screen name="MoreBlog" component={MoreBlog} /> |
|
|
|
|
<PROFILEStack.Screen name="Blog" component={Blog} /> |
|
|
|
@ -623,14 +604,14 @@ const Navigation = ({ |
|
|
|
|
} |
|
|
|
|
getStatus(); |
|
|
|
|
StatusBar.setBarStyle( |
|
|
|
|
`${theme === "light" ? "dark" : "light"}-content`, |
|
|
|
|
true |
|
|
|
|
`${theme === 'light' ? 'dark' : 'light'}-content`, |
|
|
|
|
true, |
|
|
|
|
); |
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
Dimensions.addEventListener("change", () => { |
|
|
|
|
const dim = Dimensions.get("window"); |
|
|
|
|
setOrientation(dim.height > dim.width ? "portrait" : "landscape"); |
|
|
|
|
Dimensions.addEventListener('change', () => { |
|
|
|
|
const dim = Dimensions.get('window'); |
|
|
|
|
setOrientation(dim.height > dim.width ? 'portrait' : 'landscape'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
@ -641,11 +622,10 @@ const Navigation = ({ |
|
|
|
|
headerShown: false, |
|
|
|
|
contentStyle: { |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
theme === 'light' ? Colors.theme1.white : Colors.theme1.dark, |
|
|
|
|
}, |
|
|
|
|
unmountOnBlur: true, |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
}}> |
|
|
|
|
<Stack.Screen name="Splash" component={Splash} /> |
|
|
|
|
<Stack.Screen name="Login" component={Login} /> |
|
|
|
|
<Stack.Screen name="Rules" component={Rules} /> |
|
|
|
@ -680,7 +660,7 @@ const Navigation = ({ |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const mapStateToProps = (state) => ({ |
|
|
|
|
const mapStateToProps = state => ({ |
|
|
|
|
userProducts: state.userProduct.list, |
|
|
|
|
theme: state.publicApi.theme, |
|
|
|
|
ltr: state.publicApi.ltr, |
|
|
|
|