update 63 files

master
Reza_ashrafi 3 years ago
parent 0aa0fec1c4
commit a0b60570b2
  1. 2
      package.json
  2. 2
      src/components/AlertModal.js
  3. 2
      src/components/Avatar.js
  4. 4
      src/components/Drawer.js
  5. 2
      src/components/Header.js
  6. 2
      src/components/Pressable.js
  7. 256
      src/navigation.js
  8. 2
      src/screens/AR/components/Book.js
  9. 2
      src/screens/Address/index.js
  10. 10
      src/screens/Blog/index.js
  11. 2
      src/screens/Blogs/index.js
  12. 2
      src/screens/Blogs/layouts/Hashtags.js
  13. 2
      src/screens/Blogs/layouts/Header.js
  14. 2
      src/screens/Blogs/layouts/More.js
  15. 2
      src/screens/Blogs/layouts/New.js
  16. 6
      src/screens/Blogs/layouts/Single.js
  17. 8
      src/screens/Blogs/layouts/Target.js
  18. 2
      src/screens/Contact/layouts/Box.js
  19. 4
      src/screens/Contact/layouts/TicketStatus.js
  20. 4
      src/screens/Contact/layouts/Tickets.js
  21. 2
      src/screens/DeliveryForm/Address/index.js
  22. 2
      src/screens/DeliveryForm/TransportDate/index.js
  23. 2
      src/screens/DeliveryForm/TransportMethod/index.js
  24. 8
      src/screens/DeliveryForm/index.js
  25. 2
      src/screens/Faq/components/Instance.js
  26. 2
      src/screens/Faq/index.js
  27. 2
      src/screens/Home/components/Blogs.js
  28. 2
      src/screens/Home/components/Header.js
  29. 2
      src/screens/Home/components/MyBooks.js
  30. 2
      src/screens/Home/components/Videos.js
  31. 2
      src/screens/Login/index.js
  32. 8
      src/screens/OrderDetails/components/Book.js
  33. 20
      src/screens/OrderDetails/index.js
  34. 4
      src/screens/OrdersFollowUp/components/Order.js
  35. 8
      src/screens/Otp/index.js
  36. 8
      src/screens/Product/components/Book.js
  37. 2
      src/screens/Product/components/Comments.js
  38. 2
      src/screens/Product/components/Info.js
  39. 5
      src/screens/Product/components/LinkBox.js
  40. 2
      src/screens/Product/components/Rates.js
  41. 43
      src/screens/Product/index.js
  42. 6
      src/screens/Products/components/Main.js
  43. 6
      src/screens/Profile/components/ProfileAddress/index.js
  44. 2
      src/screens/Profile/components/ProfileBookmark/index.js
  45. 6
      src/screens/Profile/components/User.js
  46. 85
      src/screens/Profile/index.js
  47. 2
      src/screens/QRContent/Content/Links.js
  48. 2
      src/screens/QRContent/Content/PDF.js
  49. 2
      src/screens/QRContent/Content/PPT.js
  50. 2
      src/screens/QRContent/Content/Video.js
  51. 2
      src/screens/QRContent/Content/Voice.js
  52. 2
      src/screens/QRContent/Content/index.js
  53. 4
      src/screens/Rules/index.js
  54. 2
      src/screens/ShoppingCart/components/Code.js
  55. 6
      src/screens/ShoppingCart/components/Product.js
  56. 195
      src/screens/ShoppingCart/index.js
  57. 6
      src/screens/Video/components/Season.js
  58. 4
      src/screens/VideoDisplay/components/Season/index.js
  59. 2
      src/screens/VideoDisplay/index.js
  60. 6
      src/screens/Videos/components/MostViewedVideo.js
  61. 2
      src/screens/Videos/components/NewestVideo.js
  62. 55
      src/screens/Videos/index.js
  63. 88
      yarn.lock

@ -19,6 +19,8 @@
"react-native": "0.68.2",
"react-native-awesome-alerts": "1.5.2",
"react-native-copilot": "^2.5.1",
"react-native-htmlview": "^0.16.0",
"react-native-ratings": "^8.1.0",
"react-native-safe-area-context": "^4.2.5",
"react-native-screens": "3.10.2",
"react-native-select-dropdown": "1.13.0",

@ -82,7 +82,7 @@ const AlertModal = (props) => {
showProgress={alert.showProgress}
title={alert.title}
titleStyle={{
fontFamily: "Bold",
fontFamily: "Medium",
color:
props.theme === "light"
? Colors.theme1.gray20

@ -81,7 +81,7 @@ function Avatar({ source, size, theme, action }) {
top: 16,
left: 16,
color: "white",
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.tiny,
}}
>

@ -451,7 +451,7 @@ const Drawer = ({
style={{
fontSize: mobile ? fontSize.tiny : fontSize.lg,
color: "white",
fontFamily: "Bold",
fontFamily: "Medium",
marginTop: 5,
textAlign: "right",
}}
@ -514,7 +514,7 @@ const Drawer = ({
marginRight: 5,
marginTop: 3,
fontSize: fontSize.xl4,
fontFamily: "Bold",
fontFamily: "Medium",
color: Colors.theme1.gray20 + "77",
}}
>

@ -29,7 +29,7 @@ function Header({ title, description, background }) {
{
fontSize: fontSize.xl,
color: Colors.theme1.greenCF,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>

@ -44,7 +44,7 @@ function Pressable1({
? textFontSize
: fontSize.base,
color: color,
fontFamily: "Bold",
fontFamily: "Medium",
textAlign: "center",
}}
>

@ -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,

@ -37,7 +37,7 @@ const Book = ({ book, mobile, theme }) => {
<Text
style={[
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: mobile ? fontSize.lg : fontSize.tiny,
marginTop: 5,
color:

@ -348,7 +348,7 @@ const Address = ({
<View style={tw(`flex ${mobile ? "mt-2" : "mt-8"}`)}>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: mobile ? fontSize.lg : fontSize.lg,
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.white,

@ -170,7 +170,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.base,
textAlign: ios ? "right" : "auto",
marginBottom: 60,
@ -199,7 +199,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
? Colors.theme1.gray20
: Colors.theme1.grayF9,
textAlign: "right",
fontFamily: "Bold",
fontFamily: "Medium",
lineHeight: 25,
fontSize: fontSize.xl4,
marginVertical: -15,
@ -211,7 +211,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
? Colors.theme1.gray20
: Colors.theme1.grayF9,
textAlign: "right",
fontFamily: "Bold",
fontFamily: "Medium",
lineHeight: 25,
fontSize: fontSize.xl,
marginVertical: -10,
@ -222,7 +222,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
? Colors.theme1.gray20
: Colors.theme1.grayF9,
textAlign: "right",
fontFamily: "Bold",
fontFamily: "Medium",
lineHeight: 25,
fontSize: fontSize.lg,
marginVertical: -10,
@ -243,7 +243,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
? Colors.theme1.gray20
: Colors.theme1.grayF9,
textAlign: "right",
fontFamily: "Bold",
fontFamily: "Medium",
lineHeight: 25,
},
ul: {

@ -137,7 +137,7 @@ const HashtagBlog = ({ blog, theme }) => {
<Text
style={{
fontSize: fontSize.lg,
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.grayF9,
marginTop: 5,

@ -73,7 +73,7 @@ const Hashtag = ({ hashtag, theme, setHashtag, activeTag }) => {
style={[
tw("px-2 py-0.5 mx-1"),
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.sm,
color:
theme === "light"

@ -30,7 +30,7 @@ export const Header = ({ title, theme }) => {
theme === "light"
? Colors.theme1.black
: Colors.theme1.white + "dd",
fontFamily: "Bold",
fontFamily: "Medium",
alignItems: "center",
},
]}

@ -90,7 +90,7 @@ const Blog = ({ blog, theme }) => {
<Text
style={{
fontSize: fontSize.lg,
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.grayF9,
marginTop: 5,

@ -34,7 +34,7 @@ export const New = ({ blog, theme }) => {
<Text
style={{
fontSize: fontSize.tiny,
fontFamily: "Bold",
fontFamily: "Medium",
color: theme === "light" ? Colors.theme1.gray20 : Colors.theme1.grayF9,
marginTop: 5,
textAlign: ios ? "right" : "auto",

@ -61,7 +61,7 @@ export const Single = ({ blog, theme }) => {
style={[
tw("text-gray-100"),
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.tiny,
textAlign: ios ? "right" : "auto",
},
@ -73,7 +73,7 @@ export const Single = ({ blog, theme }) => {
style={[
tw("text-gray-100 mt-2"),
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.sm,
textAlign: ios ? "right" : "auto",
},
@ -114,7 +114,7 @@ export const Single = ({ blog, theme }) => {
<View style={tw("flex mt-3")}>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.lg,
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.grayF9,

@ -51,7 +51,7 @@ const Target = ({ blogs, theme }) => {
style={[
tw("my-3"),
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.lg,
textAlign: ios ? "right" : "auto",
color:
@ -75,7 +75,7 @@ const Target = ({ blogs, theme }) => {
{/* <Text
style={[
{
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light"
? Colors.theme1.gray20
@ -107,7 +107,7 @@ const Target = ({ blogs, theme }) => {
<Text
style={[
{
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light"
? Colors.theme1.gray20
@ -155,7 +155,7 @@ const Target = ({ blogs, theme }) => {
style={[
tw("my-2"),
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.sm,
textAlign: ios ? "right" : "auto",
color:

@ -41,7 +41,7 @@ const Box = ({ info, mobile }) => {
<View style={tw("flex flex-1 mr-3")}>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.lg,
color: info.title.color,
textAlign: ios ? "right" : "auto",

@ -82,7 +82,7 @@ const Ticket = ({ ticket }) => {
>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.tiny,
color: Colors.theme1.green79,
textAlign: "left",
@ -92,7 +92,7 @@ const Ticket = ({ ticket }) => {
</Text>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
textAlign: "right",
fontSize: fontSize.lg,
color: Colors.theme1.green79,

@ -128,7 +128,7 @@ const Ticket = ({ ticket, theme, isAnswered }) => {
>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.tiny,
color: light
? Colors.theme1.green79
@ -142,7 +142,7 @@ const Ticket = ({ ticket, theme, isAnswered }) => {
</Text>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
textAlign: "right",
fontSize: fontSize.lg,
color: light

@ -160,7 +160,7 @@ const Address = ({
<Text
style={{
fontSize: mobile ? fontSize.base : fontSize.base,
fontFamily: "Bold",
fontFamily: "Medium",
color: light ? Colors.theme1.green79 : Colors.theme1.white,
textAlign: ios ? "right" : "auto",
}}

@ -89,7 +89,7 @@ const TransportDate = ({ transportDate, mobile, theme }) => {
<Text
style={{
fontSize: mobile ? fontSize.base : fontSize.base,
fontFamily: "Bold",
fontFamily: "Medium",
color: light ? Colors.theme1.green79 : Colors.theme1.white,
textAlign: ios ? "right" : "auto",
}}

@ -144,7 +144,7 @@ const TransportMethod = ({
<Text
style={{
fontSize: mobile ? fontSize.base : fontSize.tiny,
fontFamily: "Bold",
fontFamily: "Medium",
color: light ? Colors.theme1.green79 : Colors.theme1.white,
textAlign: ios ? "right" : "auto",
}}

@ -40,7 +40,7 @@ const PriceStatus = ({ name, value, type, theme }) => {
fontSize: fontSize.tiny,
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -57,7 +57,7 @@ const PriceStatus = ({ name, value, type, theme }) => {
? Colors.theme1.green79
: Colors.theme1.white,
fontSize: fontSize.xl,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -187,7 +187,7 @@ const DeliveryForm = ({
? Colors.theme1.green79
: Colors.theme1.white,
fontSize: fontSize.base,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -202,7 +202,7 @@ const DeliveryForm = ({
? Colors.theme1.green79
: Colors.theme1.white,
fontSize: fontSize.xl,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>

@ -36,7 +36,7 @@ function Instance({ question, selectFaq, mobile, theme }) {
? Colors.theme1.green79
: Colors.theme1.grayF9,
fontSize: mobile ? fontSize.tiny : fontSize.base,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>

@ -99,7 +99,7 @@ function Faq({
<Text
style={[
tw("w-full px-4 mt-10 text-center"),
{ fontFamily: "Bold", color: Colors.theme1.gray20 + "77" },
{ fontFamily: "Medium", color: Colors.theme1.gray20 + "77" },
]}
>
موردی یافت نشد.

@ -91,7 +91,7 @@ const Blog = ({ blog, mobile, theme }) => {
{
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: mobile ? fontSize.sm : fontSize.tiny,
textAlign: ios ? "right" : "auto",
},

@ -39,7 +39,7 @@ const Header = ({ title, route, mobile, theme, state = null }) => {
color:
theme === "light" ? Colors.theme1.green79 : Colors.theme1.white,
fontSize: fontSize.sm,
fontFamily: "Bold",
fontFamily: "Medium",
}}
>
مشاهده همه

@ -110,7 +110,7 @@ const Book = ({ book, grades, theme, mobile }) => {
{
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.tiny,
},
]}

@ -81,7 +81,7 @@ const Video = ({ video, mobile, grades, theme }) => {
{
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: mobile ? fontSize.sm : fontSize.tiny,
textAlign: ios ? "right" : "auto",
},

@ -203,7 +203,7 @@ function Login(props) {
>
ورود شما در سامانه به منزله قبول و{" "}
<Text
style={{ fontFamily: "Bold", fontSize: fontSize.tiny }}
style={{ fontFamily: "Medium", fontSize: fontSize.tiny }}
onPress={() => navigation.push("Rules")}
>
شرایط , قوانین استفاده

@ -42,7 +42,7 @@ function Book({ book, mobile, grades, theme }) {
theme === "light"
? Colors.theme1.green79
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -87,7 +87,7 @@ function Book({ book, mobile, grades, theme }) {
backgroundColor: theme === "light" ? "#F1F1F1" : null,
borderWidth: theme === "light" ? 0 : 1,
borderColor: "#f1f1f1",
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -96,7 +96,7 @@ function Book({ book, mobile, grades, theme }) {
<View style={tw("flex flex-row items-center")}>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: mobile ? fontSize.sm : fontSize.lg,
color:
theme === "light" ? Colors.theme1.green79 : Colors.theme1.white,
@ -113,7 +113,7 @@ function Book({ book, mobile, grades, theme }) {
? Colors.theme1.green79
: Colors.theme1.white,
fontSize: mobile ? fontSize.xl : fontSize.xl,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>

@ -104,7 +104,7 @@ function OrderDetails({ mobile, route, theme }) {
? Colors.theme1.green79
: Colors.theme1.white,
fontSize: mobile ? fontSize.sm : fontSize.tiny,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -137,7 +137,7 @@ function OrderDetails({ mobile, route, theme }) {
? Colors.theme1.green79
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -181,7 +181,7 @@ function OrderDetails({ mobile, route, theme }) {
? Colors.theme1.green79
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -215,7 +215,7 @@ function OrderDetails({ mobile, route, theme }) {
? Colors.theme1.green79
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -260,7 +260,7 @@ function OrderDetails({ mobile, route, theme }) {
? Colors.theme1.green79
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -299,7 +299,7 @@ function OrderDetails({ mobile, route, theme }) {
? Colors.theme1.green79
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -343,7 +343,7 @@ function OrderDetails({ mobile, route, theme }) {
? Colors.theme1.green79
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -376,7 +376,7 @@ function OrderDetails({ mobile, route, theme }) {
? Colors.theme1.green79
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -420,7 +420,7 @@ function OrderDetails({ mobile, route, theme }) {
? Colors.theme1.green79
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -455,7 +455,7 @@ function OrderDetails({ mobile, route, theme }) {
? Colors.theme1.green79
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>

@ -119,7 +119,7 @@ function Order({ order, mobile, theme }) {
{
textAlign: theme === "light" ? "center" : "right",
fontSize: fontSize.sm,
fontFamily: "Bold",
fontFamily: "Medium",
backgroundColor: theme === "light" ? "#F0FFF1" : null,
color: theme === "light" ? Colors.theme1.green79 : "#F0FFF1",
paddingHorizontal: theme === "light" ? 8 : 0,
@ -140,7 +140,7 @@ function Order({ order, mobile, theme }) {
theme === "light"
? Colors.theme1.gray20
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>

@ -258,7 +258,7 @@ function Otp(props) {
tw("py-3 px-5 text-center rounded-md mx-1.5"),
{
fontSize: fontSize.xl5,
fontFamily: "Bold",
fontFamily: "Medium",
color:
props.theme === "light"
? Colors.theme1.green79
@ -284,7 +284,7 @@ function Otp(props) {
tw("py-3 px-5 text-center rounded-md mx-1.5"),
{
fontSize: fontSize.xl5,
fontFamily: "Bold",
fontFamily: "Medium",
color:
props.theme === "light"
? Colors.theme1.green79
@ -310,7 +310,7 @@ function Otp(props) {
tw("py-3 px-5 text-center rounded-md mx-1.5"),
{
fontSize: fontSize.xl5,
fontFamily: "Bold",
fontFamily: "Medium",
color:
props.theme === "light"
? Colors.theme1.green79
@ -336,7 +336,7 @@ function Otp(props) {
tw("py-3 px-5 text-center rounded-md mx-1.5"),
{
fontSize: fontSize.xl5,
fontFamily: "Bold",
fontFamily: "Medium",
color:
props.theme === "light"
? Colors.theme1.green79

@ -200,7 +200,7 @@ function Book({
) : (
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.sm,
color:
theme === "light"
@ -221,7 +221,7 @@ function Book({
style={[
tw("py-1 pr-2"),
{
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light"
? Colors.theme1.green79
@ -256,7 +256,7 @@ function Book({
>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.xs,
color:
theme === "light"
@ -318,7 +318,7 @@ function Book({
: Colors.theme1.white,
fontSize: mobile ? fontSize.base : fontSize.lg,
marginBottom: 5,
fontFamily: "Bold",
fontFamily: "Medium",
textAlign: ios ? "right" : "auto",
}}
>

@ -79,7 +79,7 @@ const Comment = ({ comment, theme }) => {
/>
<Text
style={[
{ fontSize: fontSize.sm, color: "#132F52", fontFamily: "Bold" },
{ fontSize: fontSize.sm, color: "#132F52", fontFamily: "Medium" },
,
]}
>

@ -236,7 +236,7 @@ const ProductReviews = ({ list, mobile, theme }) => {
theme === "light"
? Colors.theme1.green79
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>

@ -1,7 +1,6 @@
import React, { useRef } from "react";
import { Text, TouchableOpacity, Appearance } from "react-native";
import { connect } from "react-redux";
import { Entypo } from "@expo/vector-icons";
//style
import tw from "tailwind-rn";
@ -40,11 +39,11 @@ function Description({ title, onPress, mobile, theme }) {
>
{title}
</Text>
<Entypo
{/* <Entypo
name="chevron-small-left"
size={20}
color={theme === "light" ? Colors.theme1.green79 : Colors.theme1.white}
/>
/> */}
</TouchableOpacity>
);
}

@ -56,7 +56,7 @@ function Rates({ productId, addVote, isBuyed = null, theme, rateDetail }) {
{
fontSize: fontSize.xl6,
color: theme === "light" ? "#05335F" : Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>

@ -1,51 +1,46 @@
import React, { useEffect } from "react";
import React, {useEffect} from 'react';
import {
View,
StyleSheet,
Dimensions,
ScrollView,
SafeAreaView,
StatusBar,
KeyboardAvoidingView,
} from "react-native";
import Book from "./components/Book";
import { book, config } from "../../redux/actions";
import { connect } from "react-redux";
import Navbar from "../../components/Navbar";
} from 'react-native';
import {SafeAreaView, useSafeAreaInsets} from 'react-native-safe-area-context';
import Book from './components/Book';
import {book, config} from '../../redux/actions';
import {connect} from 'react-redux';
import Navbar from '../../components/Navbar';
const { height, width } = Dimensions.get("window");
const {height, width} = Dimensions.get('window');
function Product({route, book, getBook, grades, getAvailableForSell}) {
const insets = useSafeAreaInsets();
function Product({ route, book, getBook, grades, getAvailableForSell }) {
useEffect(() => {
getAvailableForSell();
getBook({ id: route.params.id, vod: true });
getBook({id: route.params.id, vod: true});
}, []);
return (
<SafeAreaView
style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative",
flex: 1,
}}
>
style={{flex: 1, paddingTop: insets.top, paddingBottom: insets.bottom}}>
<Navbar
headerOptions={{
logo: false,
menu: false,
hamburgerMenu: false,
title: "",
title: '',
bookmark: true,
qr: false,
back: true,
bookmarkItem: { productId: book?.id },
bookmarkItem: {productId: book?.id},
}}
/>
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={styles.container}
scrollEnabled={book ? true : false}
>
scrollEnabled={book ? true : false}>
<Book book={book} grades={grades} />
</ScrollView>
</SafeAreaView>
@ -57,20 +52,20 @@ const styles = StyleSheet.create({
paddingBottom: 100,
},
container: {
flexDirection: "column",
flexDirection: 'column',
paddingVertical: 5,
paddingHorizontal: 16,
},
});
const mapStateToProps = (state) => ({
const mapStateToProps = state => ({
book: state.book.info,
grades: state.publicApi.grades,
});
const mapDispatchToProps = {
getBook: book.info,
getAvailableForSell: config.getAvailableForSell
getAvailableForSell: config.getAvailableForSell,
};
export default connect(mapStateToProps, mapDispatchToProps)(Product);

@ -99,7 +99,7 @@ const Main = ({ books, filterOptions, grades, mobile, theme, orientation }) => {
// style={[
// tw("mb-1"),
// {
// fontFamily: "Bold",
// fontFamily: "Medium",
// fontSize: mobile ? fontSize.lg : fontSize.base,
// color:
// theme === "light"
@ -129,7 +129,7 @@ const Main = ({ books, filterOptions, grades, mobile, theme, orientation }) => {
// tw("w-full flex flex-row text-left"),
// {
// fontSize: mobile ? fontSize.xl : fontSize.lg,
// fontFamily: "Bold",
// fontFamily: "Medium",
// color:
// theme === "light"
// ? Colors.theme1.gray20
@ -196,7 +196,7 @@ const Main = ({ books, filterOptions, grades, mobile, theme, orientation }) => {
style={{
fontSize: mobile ? fontSize.base : fontSize.tiny,
marginTop: 5,
fontFamily: "Bold",
fontFamily: "Medium",
width: "100%",
textAlign: ios ? "right" : "auto",
color:

@ -80,7 +80,7 @@ const ProfileAddress = ({
<Text
style={{
fontSize: fontSize.base,
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light"
? Colors.theme1.gray20
@ -363,7 +363,7 @@ const ProfileAddress = ({
>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.tiny,
color: Colors.theme1.greenCF,
}}
@ -376,7 +376,7 @@ const ProfileAddress = ({
marginRight: 5,
fontSize: fontSize.xl3,
color: Colors.theme1.greenCF,
fontFamily: "Bold",
fontFamily: "Medium",
}}
>
+

@ -151,7 +151,7 @@ const Bookmark = ({ bookmark, deleteItem, mobile, grades, theme, loading }) => {
<View style={tw(`flex mr-2 ${ios ? "items-end" : ""}`)}>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.tiny,
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.white,

@ -71,7 +71,7 @@ const User = ({ user, mobile, theme, upload }) => {
theme === "light"
? Colors.theme1.gray20
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
}}
>
{(user?.firstName || " ") + " " + (user?.lastName || " ")}
@ -129,7 +129,7 @@ const User = ({ user, mobile, theme, upload }) => {
<Text
style={{
fontSize: mobile ? fontSize.base : fontSize.xl,
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light"
? Colors.theme1.gray20
@ -143,7 +143,7 @@ const User = ({ user, mobile, theme, upload }) => {
marginRight: 5,
marginTop: 3,
fontSize: fontSize.xl2,
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light"
? Colors.theme1.gray20

@ -1,59 +1,54 @@
import React, { useState, useEffect } from "react";
import React, {useState, useEffect} from 'react';
import {
View,
Text,
ScrollView,
Dimensions,
StyleSheet,
Pressable,
SafeAreaView,
StatusBar,
LayoutAnimation,
ActivityIndicator,
} from "react-native";
import { connect } from "react-redux";
import { useNavigation } from "@react-navigation/native";
import { asyncAwesomeAlert } from "../../utils/AsyncWrappers";
import { user } from "../../redux/actions";
import Svg, { G, Path } from "react-native-svg";
} from 'react-native';
import {SafeAreaView, useSafeAreaInsets} from 'react-native-safe-area-context';
import {connect} from 'react-redux';
import {useNavigation} from '@react-navigation/native';
import {asyncAwesomeAlert} from '../../utils/AsyncWrappers';
import {user} from '../../redux/actions';
import Svg, {G, Path} from 'react-native-svg';
//components
import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer";
import User from "./components/User";
import Trophy from "./components/Trophy";
import List from "./components/List";
import Navbar from '../../components/Navbar';
import Drawer from '../../components/Drawer';
import User from './components/User';
import Trophy from './components/Trophy';
import List from './components/List';
//style
import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
import tw from "tailwind-rn";
import fontSize from '../../constants/fontSize';
import Colors from '../../constants/Colors';
import tw from 'tailwind-rn';
function Profile({ mobile, theme, logout, loading }) {
function Profile({mobile, theme, logout, loading}) {
const insets = useSafeAreaInsets();
const navigation = useNavigation();
const [position, setPosition] = useState("100%");
const [position, setPosition] = useState('100%');
useEffect(() => {}, []);
const setBoxPosition = () => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
setPosition(position === "100%" ? "0%" : "100%");
setPosition(position === '100%' ? '0%' : '100%');
};
return (
<SafeAreaView
style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative",
}}
>
style={{flex: 1, paddingTop: insets.top, paddingBottom: insets.bottom}}>
<Navbar
setBoxPosition={setBoxPosition}
headerOptions={{
logo: false,
menu: false,
hamburgerMenu: false,
title: "حساب کاربری",
title: 'حساب کاربری',
bookmark: false,
qr: false,
back: false,
@ -62,31 +57,28 @@ function Profile({ mobile, theme, logout, loading }) {
<Drawer setBoxPosition={setBoxPosition} position={position} />
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={styles.container}
>
style={styles.container}>
<User />
{/* <Trophy /> */}
<List />
<Pressable
style={tw(`flex w-full ${mobile ? "mt-0" : "mt-4"}`)}
style={tw(`flex w-full ${mobile ? 'mt-0' : 'mt-4'}`)}
onPress={() =>
asyncAwesomeAlert("", "آیا قصد خروج از حساب کاربری فعلی رو داری؟", {
asyncAwesomeAlert('', 'آیا قصد خروج از حساب کاربری فعلی رو داری؟', {
showCancelButton: true,
confirmText: "آره",
cancelText: "خیر",
confirmText: 'آره',
cancelText: 'خیر',
onConfirm: () => {
navigation.reset({
index: 0,
routes: [{ name: "Login" }],
routes: [{name: 'Login'}],
});
logout();
},
})
}
>
}>
<View
style={[tw(`flex items-center w-full pb-3 mb-3 flex-row-reverse`)]}
>
style={[tw(`flex items-center w-full pb-3 mb-3 flex-row-reverse`)]}>
{loading ? (
<ActivityIndicator
color={Colors.theme1.redC0}
@ -98,15 +90,13 @@ function Profile({ mobile, theme, logout, loading }) {
xmlns="http://www.w3.org/2000/svg"
width={34.034}
height={34.034}
style={{ transform: [{ scale: 0.8 }] }}
>
style={{transform: [{scale: 0.8}]}}>
<G
fill="none"
stroke="#ff2020"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
>
strokeWidth={2}>
<Path d="M12.621 10.721c.44-5.105 3.063-7.19 8.806-7.19h.184c6.339 0 8.877 2.538 8.877 8.877v9.246c.001 6.339-2.537 8.877-8.876 8.877h-.185c-5.7 0-8.324-2.056-8.792-7.076" />
<Path
data-name="Vector"
@ -119,11 +109,10 @@ function Profile({ mobile, theme, logout, loading }) {
<Text
style={{
fontSize: fontSize.tiny,
fontFamily: "Bold",
fontFamily: 'Medium',
color: Colors.theme1.redFF1,
marginRight: 4,
}}
>
}}>
خروج از حساب کاربری
</Text>
</View>
@ -133,7 +122,7 @@ function Profile({ mobile, theme, logout, loading }) {
);
}
const mapStateToProps = (state) => ({
const mapStateToProps = state => ({
mobile: state.publicApi.mobile,
theme: state.publicApi.theme,
loading: state.user.loading,
@ -148,10 +137,10 @@ export default connect(mapStateToProps, mapDispatchToProps)(Profile);
const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 100,
position: "relative",
position: 'relative',
},
container: {
flexDirection: "column",
flexDirection: 'column',
paddingVertical: 5,
paddingHorizontal: 16,
},

@ -22,7 +22,7 @@ export default function Links({ links }) {
<Text
style={{
fontSize: fontSize.tiny,
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light" ? Colors.theme1.gray2077 : Colors.theme1.white,
}}

@ -27,7 +27,7 @@ export default function PDF({ data }) {
tw("text-right text-red-900"),
{
fontSize: fontSize.tiny,
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light" ? Colors.theme1.gray2077 : Colors.theme1.white,
},

@ -23,7 +23,7 @@ export default function PPT({ name, file }) {
tw("text-right text-green-900"),
{
fontSize: fontSize.tiny,
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light" ? Colors.theme1.gray2077 : Colors.theme1.white,
},

@ -19,7 +19,7 @@ export default function VideoContent({ data, theme }) {
tw("w-full text-right text-green-900 mb-4"),
{
fontSize: fontSize.tiny,
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light" ? Colors.theme1.gray2077 : Colors.theme1.white,
},

@ -20,7 +20,7 @@ export default function Voice({ data }) {
tw("w-full text-right text-xs text-green-900"),
{
fontSize: fontSize.tiny,
fontFamily: "Bold",
fontFamily: "Medium",
color:
theme === "light" ? Colors.theme1.gray2077 : Colors.theme1.white,
},

@ -26,7 +26,7 @@ export default function Content({ data, grades, theme }) {
<View style={tw("flex pr-2")}>
<Text
style={{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.lg,
color: light ? Colors.theme1.green79 : Colors.theme1.white,
textAlign: "right",

@ -93,7 +93,7 @@ const Rules = ({ route, mobile, theme }) => {
style={[
tw("text-center my-3 p-2 rounded-sm"),
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.sm,
color: Colors.theme1.redC0,
backgroundColor: theme === 'light' ? Colors.theme1.redFF : null,
@ -184,7 +184,7 @@ const Rule = ({ rule, theme }) => {
style={[
tw("mb-1 p-2 rounded-sm"),
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.sm,
color:
theme === "light" ? Colors.theme1.green79 : Colors.theme1.greenCF,

@ -81,7 +81,7 @@ function Code({ codeId, setCodeId, theme, loading, mobile }) {
<Text
style={[
tw("text-white"),
{ fontSize: fontSize.tiny, fontFamily: "Bold" },
{ fontSize: fontSize.tiny, fontFamily: "Medium" },
]}
>
ثبت کد

@ -86,7 +86,7 @@ function Product({
color:
theme === "light" ? Colors.theme1.green79 : Colors.theme1.white,
marginBottom: 5,
fontFamily: "Bold",
fontFamily: "Medium",
}}
>
{product?.product?.book?.name || " "}
@ -225,7 +225,7 @@ function Product({
{
fontSize: fontSize.xl6,
color: Colors.theme1.greenBA,
fontFamily: "Bold",
fontFamily: "Medium",
},
]}
>
@ -258,7 +258,7 @@ function Product({
style={{
fontSize: mobile ? fontSize.xl : fontSize.xl4,
color: Colors.theme1.greenCF,
fontFamily: "Bold",
fontFamily: "Medium",
}}
>
-

@ -1,4 +1,4 @@
import React, { useState, useEffect, useCallback } from "react";
import React, {useState, useEffect, useCallback} from 'react';
import {
View,
Text,
@ -6,82 +6,79 @@ import {
Dimensions,
StyleSheet,
Pressable,
SafeAreaView,
StatusBar,
LayoutAnimation,
KeyboardAvoidingView,
Appearance,
} from "react-native";
import { connect } from "react-redux";
import { userProduct, userFactor } from "../../redux/actions";
} from 'react-native';
import {SafeAreaView, useSafeAreaInsets} from 'react-native-safe-area-context';
import {connect} from 'react-redux';
import {userProduct, userFactor} from '../../redux/actions';
// import { Ionicons } from "@expo/vector-icons";
import { useNavigation } from "@react-navigation/native";
import { asyncAwesomeAlert } from "../../utils/AsyncWrappers";
import separate from "../../utils/separate";
import {useNavigation} from '@react-navigation/native';
import {asyncAwesomeAlert} from '../../utils/AsyncWrappers';
import separate from '../../utils/separate';
//components
import Product from "./components/Product";
import Code from "./components/Code";
import CustomPressable from "../../components/Pressable";
import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer";
import Empty from "../../components/Empty";
import Product from './components/Product';
import Code from './components/Code';
import CustomPressable from '../../components/Pressable';
import Navbar from '../../components/Navbar';
import Drawer from '../../components/Drawer';
import Empty from '../../components/Empty';
//style
import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
import tw from "tailwind-rn";
import fontSize from '../../constants/fontSize';
import Colors from '../../constants/Colors';
import tw from 'tailwind-rn';
const { height } = Dimensions.get("window");
const {height} = Dimensions.get('window');
const PriceStatus = ({ name, value, type, theme }) => {
const PriceStatus = ({name, value, type, theme}) => {
return (
<View style={tw("w-full flex flex-row-reverse justify-between py-2")}>
<View style={tw('w-full flex flex-row-reverse justify-between py-2')}>
<Text
style={[
tw(""),
tw(''),
{
fontSize: fontSize.tiny,
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.white,
fontFamily: "Bold",
theme === 'light' ? Colors.theme1.gray20 : Colors.theme1.white,
fontFamily: 'Medium',
},
]}
>
]}>
{name}
</Text>
<View style={tw("flex flex-row-reverse items-center")}>
<View style={tw('flex flex-row-reverse items-center')}>
<Text
style={[
{
color:
type === "error"
type === 'error'
? Colors.theme1.redFF1
: theme === "light"
: theme === 'light'
? Colors.theme1.green79
: Colors.theme1.white,
fontSize: fontSize.xl,
fontFamily: "Bold",
fontFamily: 'Medium',
},
]}
>
]}>
{value}
</Text>
<Text
style={[
{
color:
type === "error"
type === 'error'
? Colors.theme1.redFF1
: theme === "light"
: theme === 'light'
? Colors.theme1.green79
: Colors.theme1.white,
fontSize: fontSize.sm,
fontFamily: "Regular",
fontFamily: 'Regular',
marginRight: 4,
},
]}
>
]}>
تومان
</Text>
</View>
@ -99,77 +96,69 @@ function ShoppingCart({
payFactor,
theme,
}) {
const insets = useSafeAreaInsets();
const navigation = useNavigation();
const [position, setPosition] = useState("100%");
const [position, setPosition] = useState('100%');
const isEmpty = React.useMemo(() => {
return list?.filter((product) => product?.condition < 2)?.length === 0;
return list?.filter(product => product?.condition < 2)?.length === 0;
}, [list]);
const hasPhysical = React.useMemo(() => {
return (
list?.filter(
(product) => product?.condition < 2 && product?.productType === 2
)?.length
);
return list?.filter(
product => product?.condition < 2 && product?.productType === 2,
)?.length;
}, [list]);
useEffect(() => {
getFactorInfo({ userId });
getFactorInfo({userId});
}, [list]);
useEffect(() => {
getList();
getFactorInfo({ userId });
getFactorInfo({userId});
}, []);
const setBoxPosition = useCallback(() => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
setPosition(position === "100%" ? "0%" : "100%");
setPosition(position === '100%' ? '0%' : '100%');
}, [userId]);
return (
<SafeAreaView
style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative",
flex: 1,
}}
>
<KeyboardAvoidingView behavior="padding" style={{ flex: 1 }}>
style={{flex: 1, paddingTop: insets.top, paddingBottom: insets.bottom}}>
<KeyboardAvoidingView behavior="padding" style={{flex: 1}}>
<Navbar
setBoxPosition={setBoxPosition}
headerOptions={{
logo: false,
menu: false,
hamburgerMenu: false,
title: "سبد خرید",
title: 'سبد خرید',
bookmark: false,
qr: false,
back: false,
}}
/>
<Drawer setBoxPosition={setBoxPosition} position={position} />
{list?.filter((product) => product?.condition < 2)?.length ? (
{list?.filter(product => product?.condition < 2)?.length ? (
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={styles.container}
>
style={styles.container}>
{list
?.sort((a, b) => a?.id - b?.id)
?.map((product, index) =>
product?.condition < 2 ? (
<Product key={index} product={product} loading={loading} />
) : null
) : null,
)}
<Code />
<View
style={tw(
`flex w-full border-t py-2 border-gray-300 border-b mt-6 ${
theme === "light" ? "" : "border-opacity-20"
}`
)}
>
theme === 'light' ? '' : 'border-opacity-20'
}`,
)}>
<PriceStatus
name="مبلغ سبد خرید"
value={
@ -190,83 +179,81 @@ function ShoppingCart({
</View>
<View
style={tw(
"flex flex-row-reverse justify-between items-center w-full py-3"
)}
>
'flex flex-row-reverse justify-between items-center w-full py-3',
)}>
<Text
style={[
{
color:
theme === "light"
theme === 'light'
? Colors.theme1.green79
: Colors.theme1.white,
fontSize: fontSize.base,
fontFamily: "Bold",
fontFamily: 'Medium',
},
]}
>
]}>
جمع کل سبد خرید
</Text>
<View style={tw("flex flex-row-reverse items-center")}>
<View style={tw('flex flex-row-reverse items-center')}>
<Text
style={[
{
color:
theme === "light"
theme === 'light'
? Colors.theme1.green79
: Colors.theme1.white,
fontSize: fontSize.xl,
fontFamily: "Bold",
fontFamily: 'Medium',
},
]}
>
{isEmpty ? 0 : separate(factorInfo?.payPrice - factorInfo?.transportPrice)}
]}>
{isEmpty
? 0
: separate(
factorInfo?.payPrice - factorInfo?.transportPrice,
)}
</Text>
<Text
style={[
{
color:
theme === "light"
theme === 'light'
? Colors.theme1.green79
: Colors.theme1.white,
fontSize: fontSize.sm,
fontFamily: "Regular",
fontFamily: 'Regular',
marginRight: 4,
},
]}
>
]}>
تومان
</Text>
</View>
</View>
<View style={tw("w-full")}>
<View style={tw('w-full')}>
<Pressable
style={[
tw(
"w-full rounded-md flex flex-row justify-center items-center py-3 px-3 my-5"
'w-full rounded-md flex flex-row justify-center items-center py-3 px-3 my-5',
),
{
backgroundColor:
theme === "light"
? Colors.theme1.greenC8 + "1a"
: Colors.theme1.blue90 + "33",
theme === 'light'
? Colors.theme1.greenC8 + '1a'
: Colors.theme1.blue90 + '33',
},
]}
>
]}>
<Text
style={[
tw("mr-1"),
tw('mr-1'),
{
color:
theme === "light"
theme === 'light'
? Colors.theme1.green79
: Colors.theme1.white,
fontSize: fontSize.sm,
fontFamily: "Regular",
fontFamily: 'Regular',
},
]}
>
]}>
هزینه ارسال کالا پس از تعیین محل آدرس مشخص میشود
</Text>
{/* <Ionicons
@ -281,28 +268,28 @@ function ShoppingCart({
</Pressable>
<CustomPressable
title={hasPhysical ? "ادامه فرایند خرید" : "پرداخت"}
title={hasPhysical ? 'ادامه فرایند خرید' : 'پرداخت'}
backgroundColor={Colors.theme1.greenCF}
color={"white"}
border={{ color: "#196EC0", width: 0 }}
width={"100%"}
color={'white'}
border={{color: '#196EC0', width: 0}}
width={'100%'}
onPress={() =>
isEmpty
? asyncAwesomeAlert("خطا", "سبد خرید شما خالی است.", {
? asyncAwesomeAlert('خطا', 'سبد خرید شما خالی است.', {
showCancelButton: false,
})
: hasPhysical
? navigation.navigate("DeliveryForm")
: payFactor({ userId })
? navigation.navigate('DeliveryForm')
: payFactor({userId})
}
/>
</View>
</ScrollView>
) : (
<Empty
text={"سبد خرید شما خالی است"}
buttonText={"فروشگاه"}
buttonAction={() => navigation.navigate("Products")}
text={'سبد خرید شما خالی است'}
buttonText={'فروشگاه'}
buttonAction={() => navigation.navigate('Products')}
/>
)}
</KeyboardAvoidingView>
@ -310,7 +297,7 @@ function ShoppingCart({
);
}
const mapStateToProps = (state) => ({
const mapStateToProps = state => ({
list: state.userProduct.list,
payPrice: state.userProduct.sum,
factorInfo: state.userFactor.info,
@ -332,10 +319,10 @@ export default connect(mapStateToProps, mapDispatchToProps)(ShoppingCart);
const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 120,
position: "relative",
position: 'relative',
},
container: {
flexDirection: "column",
flexDirection: 'column',
paddingVertical: 5,
paddingHorizontal: 16,
},

@ -56,7 +56,7 @@ const Season = ({
<Text
style={[
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: mobile ? fontSize.base : fontSize.lg,
color:
theme === "light"
@ -124,7 +124,7 @@ const Season = ({
style={{
width: "100%",
textAlign: "center",
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: mobile ? fontSize.tiny : fontSize.tiny,
color:
Number(index) === 0
@ -163,7 +163,7 @@ const Season = ({
<Text
style={[
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: mobile ? fontSize.base : fontSize.base,
color:
theme === "light"

@ -75,7 +75,7 @@ const Season = ({
<Text
style={[
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: mobile ? fontSize.base : fontSize.xl,
color:
activeUnit === unit
@ -91,7 +91,7 @@ const Season = ({
<Text
style={[
{
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: mobile ? fontSize.base : fontSize.base,
color:
activeUnit === unit

@ -118,7 +118,7 @@ function VideoDisplay({ route, mobile, theme }) {
<Text
style={{
fontSize: fontSize.xl,
fontFamily: "Bold",
fontFamily: "Medium",
marginTop: mobile ? 20 : 12,
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.white,

@ -69,7 +69,7 @@ function MostViewedVideo({ videos, grades, mobile, theme }) {
paddingRight: 4,
color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
}}
>
{"دوره ویدئویی" + " " + video?.name}
@ -88,7 +88,7 @@ function MostViewedVideo({ videos, grades, mobile, theme }) {
theme === "light"
? Colors.theme1.gray20
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: mobile ? fontSize.sm : fontSize.tiny,
marginRight: 3,
},
@ -103,7 +103,7 @@ function MostViewedVideo({ videos, grades, mobile, theme }) {
theme === "light"
? Colors.theme1.gray20
: Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
fontSize: fontSize.xl,
},
]}

@ -51,7 +51,7 @@ const NewestVideo = ({ videos, grades, mobile, theme }) => {
fontSize: mobile ? fontSize.base : fontSize.base,
marginTop: 5,
color: theme === 'light' ? Colors.theme1.gray20 : Colors.theme1.white,
fontFamily: "Bold",
fontFamily: "Medium",
}}
>
{video.name}

@ -1,55 +1,51 @@
import React, { useState, useEffect } from "react";
import React, {useState, useEffect} from 'react';
import {
View,
StyleSheet,
ScrollView,
SafeAreaView,
StatusBar,
Platform,
LayoutAnimation,
} from "react-native";
import { connect } from "react-redux";
import { book } from "../../redux/actions";
} from 'react-native';
import {SafeAreaView, useSafeAreaInsets} from 'react-native-safe-area-context';
import {connect} from 'react-redux';
import {book} from '../../redux/actions';
//components
import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer";
import Search from "../../components/Search";
import Divider from "../../components/Divider";
import MostViewedVideo from "./components/MostViewedVideo";
import NewestVideo from "./components/NewestVideo";
import Navbar from '../../components/Navbar';
import Drawer from '../../components/Drawer';
import Search from '../../components/Search';
import Divider from '../../components/Divider';
import MostViewedVideo from './components/MostViewedVideo';
import NewestVideo from './components/NewestVideo';
//assets
import tw from "tailwind-rn";
import tw from 'tailwind-rn';
function Videos({ grades, videos, getVideos, mobile }) {
const [search, setSearch] = useState("");
const [position, setPosition] = useState("100%");
function Videos({grades, videos, getVideos, mobile}) {
const insets = useSafeAreaInsets();
const [position, setPosition] = useState('100%');
useEffect(() => {
getVideos({ vod: true });
getVideos({vod: true});
}, []);
const setBoxPosition = () => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
setPosition(position === "100%" ? "0%" : "100%");
setPosition(position === '100%' ? '0%' : '100%');
};
return (
<SafeAreaView
style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative",
}}
>
style={{flex: 1, paddingTop: insets.top, paddingBottom: insets.bottom}}>
<Navbar
setBoxPosition={setBoxPosition}
headerOptions={{
logo: true,
menu: false,
hamburgerMenu: true,
title: "",
title: '',
bookmark: false,
qr: true,
back: false,
@ -58,9 +54,8 @@ function Videos({ grades, videos, getVideos, mobile }) {
<Drawer setBoxPosition={setBoxPosition} position={position} />
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={[styles.container]}
>
{!mobile ? <View style={tw("mt-5")}></View> : null}
style={[styles.container]}>
{!mobile ? <View style={tw('mt-5')}></View> : null}
{/* <Search
value={search}
onChange={setSearch}
@ -70,7 +65,7 @@ function Videos({ grades, videos, getVideos, mobile }) {
{videos.length ? (
<>
<MostViewedVideo videos={videos} grades={grades} />
<Divider type={"vertical"} />
<Divider type={'vertical'} />
<NewestVideo
videos={videos
.sort((a, b) => a.updatedAt - b.updatedAt)
@ -88,15 +83,15 @@ function Videos({ grades, videos, getVideos, mobile }) {
const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 100,
alignItems: "flex-end",
alignItems: 'flex-end',
},
container: {
flexDirection: "column",
flexDirection: 'column',
paddingVertical: 0,
},
});
const mapStateToProps = (state) => ({
const mapStateToProps = state => ({
grades: state.publicApi.grades,
videos: state.book.list,
grades: state.publicApi.grades,

@ -2707,6 +2707,14 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"
dom-serializer@0:
version "0.2.2"
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51"
integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==
dependencies:
domelementtype "^2.0.1"
entities "^2.0.0"
dom-serializer@^1.0.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30"
@ -2716,11 +2724,23 @@ dom-serializer@^1.0.1:
domhandler "^4.2.0"
entities "^2.0.0"
domelementtype@1, domelementtype@^1.3.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f"
integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==
domelementtype@^2.0.1, domelementtype@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d"
integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==
domhandler@^2.3.0:
version "2.4.2"
resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803"
integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==
dependencies:
domelementtype "1"
domhandler@^4.2.0, domhandler@^4.3.1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c"
@ -2728,6 +2748,14 @@ domhandler@^4.2.0, domhandler@^4.3.1:
dependencies:
domelementtype "^2.2.0"
domutils@^1.5.1:
version "1.7.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a"
integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==
dependencies:
dom-serializer "0"
domelementtype "1"
domutils@^2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135"
@ -2769,6 +2797,11 @@ end-of-stream@^1.1.0:
dependencies:
once "^1.4.0"
entities@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56"
integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==
entities@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55"
@ -3076,6 +3109,11 @@ event-target-shim@^5.0.0, event-target-shim@^5.0.1:
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==
eventemitter2@^1.0.0:
version "1.0.5"
resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-1.0.5.tgz#f983610517b1737c0b9dc643beca93893c04df18"
integrity sha512-EUFhWUYzqqBZlzBMI+dPU8rnKXfQZEUnitnccQuEIAnvWFHCpt3+4fts2+4dpxLtlsiseVXCMFg37KjYChSxpg==
execa@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
@ -3602,6 +3640,19 @@ html-escaper@^2.0.0:
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
htmlparser2-without-node-native@^3.9.2:
version "3.9.2"
resolved "https://registry.yarnpkg.com/htmlparser2-without-node-native/-/htmlparser2-without-node-native-3.9.2.tgz#b3ed050d877d0ff3465969e339877b7f9f6631f6"
integrity sha512-+FplQXqmY5fRx6vCIp2P5urWaoBCpTNJMXnKP/6mNCcyb+AZWWJzA8D03peXfozlxDL+vpgLK5dJblqEgu8j6A==
dependencies:
domelementtype "^1.3.0"
domhandler "^2.3.0"
domutils "^1.5.1"
entities "^1.1.1"
eventemitter2 "^1.0.0"
inherits "^2.0.1"
readable-stream "^2.0.2"
http-errors@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3"
@ -3675,7 +3726,7 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3:
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
@ -5822,6 +5873,21 @@ react-native-gradle-plugin@^0.0.6:
resolved "https://registry.yarnpkg.com/react-native-gradle-plugin/-/react-native-gradle-plugin-0.0.6.tgz#b61a9234ad2f61430937911003cddd7e15c72b45"
integrity sha512-eIlgtsmDp1jLC24dRn43hB3kEcZVqx6DUQbR0N1ABXGnMEafm9I3V3dUUeD1vh+Dy5WqijSoEwLNUPLgu5zDMg==
react-native-htmlview@^0.16.0:
version "0.16.0"
resolved "https://registry.yarnpkg.com/react-native-htmlview/-/react-native-htmlview-0.16.0.tgz#4a70d7c02ab3ab18e1cb708c0dcf0d99bc6c1cdc"
integrity sha512-yUrzXje+kKKLkWkccKNBeg3CbvrodA7f4+1d/XRrrg0SDFfIdj7NnjRdH+WXqGze6R501bfRZOPaZx/M5HTz3A==
dependencies:
entities "^1.1.1"
htmlparser2-without-node-native "^3.9.2"
react-native-ratings@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/react-native-ratings/-/react-native-ratings-8.1.0.tgz#3fa9ad29128dc3a88e59518ba151e61c59dd0647"
integrity sha512-+QOJ4G3NjVkI1D+tk4EGx1dCvVfbD2nQdkrj9cXrcAoEiwmbep4z4bZbCKmWMpQ5h2dqbxABU8/eBnbDmvAc3g==
dependencies:
lodash "^4.17.15"
react-native-safe-area-context@^4.2.5:
version "4.2.5"
resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.2.5.tgz#23006dc1a398bb825d7d795c27f1c46119efe8a5"
@ -5956,16 +6022,7 @@ read-pkg@^5.2.0:
parse-json "^5.0.0"
type-fest "^0.6.0"
readable-stream@^3.4.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
dependencies:
inherits "^2.0.3"
string_decoder "^1.1.1"
util-deprecate "^1.0.1"
readable-stream@~2.3.6:
readable-stream@^2.0.2, readable-stream@~2.3.6:
version "2.3.7"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
@ -5978,6 +6035,15 @@ readable-stream@~2.3.6:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
readable-stream@^3.4.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
dependencies:
inherits "^2.0.3"
string_decoder "^1.1.1"
util-deprecate "^1.0.1"
readline@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/readline/-/readline-1.3.0.tgz#c580d77ef2cfc8752b132498060dc9793a7ac01c"

Loading…
Cancel
Save