reza added some change

master
Reza_ashrafi 3 years ago
parent ff12b496eb
commit cb4d2d965d
  1. 1
      app.json
  2. 310
      navigation/index.js
  3. 2
      package.json
  4. BIN
      src/assets/icons/ar-light.png
  5. BIN
      src/assets/icons/book-active.png
  6. BIN
      src/assets/icons/book-deactive.png
  7. BIN
      src/assets/icons/dropdown.png
  8. BIN
      src/assets/icons/hamburger-light.png
  9. BIN
      src/assets/icons/home-active.png
  10. BIN
      src/assets/icons/home-deactive.png
  11. BIN
      src/assets/icons/logo.png
  12. BIN
      src/assets/icons/profile-active.png
  13. BIN
      src/assets/icons/profile-deactive.png
  14. BIN
      src/assets/icons/qr-light.png
  15. BIN
      src/assets/icons/search.png
  16. BIN
      src/assets/icons/test-active.png
  17. BIN
      src/assets/icons/test-deactive.png
  18. BIN
      src/assets/icons/video-active.png
  19. BIN
      src/assets/icons/video-deactive.png
  20. 16
      src/components/Blur.js
  21. 28
      src/components/BottomSheetComponents/ProductQuestion.js
  22. 23
      src/components/BottomSheetComponents/ProductReview.js
  23. 14
      src/components/BottomSheetComponents/ProductSpecifications.js
  24. 52
      src/components/CustomTextInput.js
  25. 9
      src/components/Drawer.js
  26. 18
      src/components/ImageSlider.js
  27. 211
      src/components/Navbar.js
  28. 27
      src/components/Pressable.js
  29. 9
      src/components/Progress.js
  30. 30
      src/components/Search.js
  31. 69
      src/components/Select.js
  32. 99
      src/constants/Colors.js
  33. 32
      src/redux/actions/book.js
  34. 3
      src/redux/actions/index.js
  35. 34
      src/redux/actions/userAddress.js
  36. 117
      src/redux/reducers/book.js
  37. 3
      src/redux/reducers/index.js
  38. 4
      src/redux/reducers/public.js
  39. 32
      src/redux/reducers/userAddress.js
  40. 12
      src/screens/Address/index.js
  41. 12
      src/screens/DeliveryForm/Address/index.js
  42. 12
      src/screens/DeliveryForm/PaymentMethod/index.js
  43. 12
      src/screens/DeliveryForm/TransportDate/index.js
  44. 12
      src/screens/DeliveryForm/TransportMethod/index.js
  45. 104
      src/screens/DeliveryForm/index.js
  46. BIN
      src/screens/Home/assets/message.png
  47. 189
      src/screens/Home/components/Blogs.js
  48. 11
      src/screens/Home/components/Header.js
  49. 119
      src/screens/Home/components/MyBooks.js
  50. 87
      src/screens/Home/components/Scroll.js
  51. 99
      src/screens/Home/components/Videos.js
  52. 6
      src/screens/Home/index.js
  53. 29
      src/screens/Login/index.js
  54. 69
      src/screens/Otp/index.js
  55. 167
      src/screens/Product/components/Book.js
  56. 19
      src/screens/Product/components/LinkBox.js
  57. 16
      src/screens/Product/index.js
  58. 56
      src/screens/Products/components/Book.js
  59. 57
      src/screens/Products/components/Header.js
  60. 297
      src/screens/Products/components/Main.js
  61. 100
      src/screens/Products/components/Video.js
  62. 69
      src/screens/Products/index.js
  63. 30
      src/screens/ShoppingCart/components/Code.js
  64. 135
      src/screens/ShoppingCart/components/Product.js
  65. 161
      src/screens/ShoppingCart/index.js
  66. 12
      src/utils/separate.js
  67. 84
      yarn.lock

@ -4,6 +4,7 @@
"slug": "RnDanovinExpo", "slug": "RnDanovinExpo",
"version": "1.0.0", "version": "1.0.0",
"orientation": "portrait", "orientation": "portrait",
"userInterfaceStyle": "automatic",
"icon": "", "icon": "",
"splash": { "splash": {
"image": "", "image": "",

@ -1,12 +1,15 @@
import React, { useEffect } from "react"; import React, { useEffect } from "react";
import { Image } from "react-native"; import Svg, { G, Path } from "react-native-svg";
import {Appearance} from 'react-native';
import { NavigationContainer } from "@react-navigation/native"; import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack"; import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { Entypo, FontAwesome } from "@expo/vector-icons"; import { connect } from "react-redux";
import { user } from "../src/redux/actions";
//components
import OrderDetails from "../src/screens/OrderDetails"; import OrderDetails from "../src/screens/OrderDetails";
import OrdersFollowUp from "../src/screens/OrdersFollowUp"; import OrdersFollowUp from "../src/screens/OrdersFollowUp";
import { Dimensions } from "react-native";
import Splash from "../src/screens/Splash"; import Splash from "../src/screens/Splash";
import Home from "../src/screens/Home"; import Home from "../src/screens/Home";
import Products from "../src/screens/Products"; import Products from "../src/screens/Products";
@ -18,33 +21,23 @@ import QR from "../src/screens/QR";
import QRContent from "../src/screens/QRContent"; import QRContent from "../src/screens/QRContent";
import Faq from "../src/screens/Faq"; import Faq from "../src/screens/Faq";
import Activation from "../src/screens/Activation"; import Activation from "../src/screens/Activation";
import { connect } from "react-redux";
import Profile from "../src/screens/Profile";
import Videos from "../src/screens/Videos"; import Videos from "../src/screens/Videos";
import Exams from "../src/screens/Exams";
import ShoppingCart from "../src/screens/ShoppingCart";
import Video from "../src/screens/Video"; import Video from "../src/screens/Video";
import VideoDisplay from "../src/screens/VideoDisplay"; import VideoDisplay from "../src/screens/VideoDisplay";
import Contact from "../src/screens/Contact"; import Contact from "../src/screens/Contact";
import Tests from "../src/screens/Tests"; import Tests from "../src/screens/Tests";
import { user } from "../src/redux/actions"; import ShoppingCart from "../src/screens/ShoppingCart";
import DeliveryForm from "../src/screens/DeliveryForm";
//assets //style
import homeDeactiveIcon from "../src/assets/icons/home-deactive.png"; import fontSize from "../src/constants/fontSize";
import homeActiveIcon from "../src/assets/icons/home-active.png"; import Colors from "../src/constants/Colors";
import videoActiveIcon from "../src/assets/icons/video-active.png";
import videoDeactiveIcon from "../src/assets/icons/video-deactive.png";
import bookDeactiveIcon from "../src/assets/icons/book-deactive.png";
import bookActiveIcon from "../src/assets/icons/book-active.png";
import testDeactiveIcon from "../src/assets/icons/test-deactive.png";
import testActiveIcon from "../src/assets/icons/test-active.png";
import profileActiveIcon from "../src/assets/icons/profile-active.png";
import profileDeactiveIcon from "../src/assets/icons/profile-deactive.png";
const width = Dimensions.get("window").width;
const Tab = createBottomTabNavigator(); const Tab = createBottomTabNavigator();
const BottomTabNavigator = () => { const BottomTabNavigator = () => {
const colorScheme = Appearance.getColorScheme();
return ( return (
<Tab.Navigator <Tab.Navigator
initialRouteName="HomeTab" initialRouteName="HomeTab"
@ -54,11 +47,11 @@ const BottomTabNavigator = () => {
tabBarActiveTintColor: "#06BACE", tabBarActiveTintColor: "#06BACE",
tabBarInactiveTintColor: "grey", tabBarInactiveTintColor: "grey",
tabBarStyle: { tabBarStyle: {
backgroundColor: "#CCE6FF", backgroundColor: Colors.theme1[colorScheme].greenFF1,
height: 70, height: 70,
}, },
tabBarLabelStyle: { tabBarLabelStyle: {
fontSize: width / 34, fontSize: fontSize.xs,
fontFamily: "regular", fontFamily: "regular",
transform: [{ translateY: -7 }], transform: [{ translateY: -7 }],
}, },
@ -68,39 +61,106 @@ const BottomTabNavigator = () => {
> >
<Tab.Screen <Tab.Screen
name="Profile" name="Profile"
component={Profile} component={Login}
options={{ options={{
title: "پروفایل", title: "پروفایل",
tabBarIcon: ({ focused, color }) => tabBarIcon: ({ focused, color }) =>
focused ? ( focused ? (
<Image <Svg
source={profileActiveIcon} xmlns="http://www.w3.org/2000/svg"
style={{ width: 33, height: 32 }} width={31.192}
/> height={31.192}
>
<G fill="#06bace">
<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"
d="M9.306 18.923c-3.145 2.105-3.145 5.537 0 7.629a12.693 12.693 0 0 0 13.01 0c3.145-2.105 3.145-5.537 0-7.629a12.752 12.752 0 0 0-13.01 0Z"
/>
</G>
</Svg>
) : ( ) : (
<Image <Svg
source={profileDeactiveIcon} xmlns="http://www.w3.org/2000/svg"
style={{ width: 33, height: 32 }} width={31.192}
/> height={31.192}
>
<G
fill="none"
stroke="#86a0b9"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
>
<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"
d="M9.306 18.923c-3.145 2.105-3.145 5.537 0 7.629a12.693 12.693 0 0 0 13.01 0c3.145-2.105 3.145-5.537 0-7.629a12.752 12.752 0 0 0-13.01 0Z"
/>
</G>
</Svg>
), ),
}} }}
/> />
<Tab.Screen <Tab.Screen
name="Tests" name="ShoppingCart"
component={Tests} component={CARTStackScreen}
options={{ options={{
title: "آزمون", title: "سبد خرید",
tabBarIcon: ({ focused, color }) => tabBarIcon: ({ focused, color }) =>
focused ? ( focused ? (
<Image <Svg
source={testActiveIcon} xmlns="http://www.w3.org/2000/svg"
style={{ width: 33, height: 32 }} width={33.323}
/> height={32.317}
>
<Path
d="M20.852 29.624h-8.381c-6.984 0-9.778-2.693-9.778-9.426v-8.079c0-6.733 2.794-9.426 9.778-9.426h8.381c6.984 0 9.778 2.693 9.778 9.426v8.079c-.001 6.733-2.794 9.426-9.778 9.426Z"
fill="#06bace"
/>
<Path
data-name="Vector"
d="M16.002 11.957H8.933M21.063 11.951l.9 1.01 2.684-3.03M16.002 21.383H8.933M21.063 21.377l.9 1.01 2.684-3.03"
fill="none"
stroke="#fff"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
</Svg>
) : ( ) : (
<Image <Svg
source={testDeactiveIcon} xmlns="http://www.w3.org/2000/svg"
style={{ width: 33, height: 32 }} width={33.323}
/> height={32.317}
>
<Path
d="M16.002 11.957H8.933"
fill="none"
stroke="#86a0b9"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
<Path
data-name="Vector"
d="m21.063 11.951.9 1.01 2.684-3.03M16.002 21.383H8.933M21.063 21.377l.9 1.01 2.684-3.03"
fill="none"
stroke="#86a0b9"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
<Path
data-name="Vector"
d="M20.852 29.624h-8.381c-6.984 0-9.778-2.693-9.778-9.426v-8.079c0-6.733 2.794-9.426 9.778-9.426h8.381c6.984 0 9.778 2.693 9.778 9.426v8.079c-.001 6.733-2.794 9.426-9.778 9.426Z"
fill="none"
stroke="#86a0b9"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
</Svg>
), ),
}} }}
/> />
@ -113,15 +173,59 @@ const BottomTabNavigator = () => {
title: "ویدئوها", title: "ویدئوها",
tabBarIcon: ({ focused, color }) => tabBarIcon: ({ focused, color }) =>
focused ? ( focused ? (
<Image <Svg
source={videoActiveIcon} xmlns="http://www.w3.org/2000/svg"
style={{ width: 32, height: 28 }} width={34.395}
/> height={29.991}
>
<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="#06bace"
stroke="#fff"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
data-name="vuesax/linear/music-playlist"
/>
<Path
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="#fff"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
</G>
</Svg>
) : ( ) : (
<Image <Svg
source={videoDeactiveIcon} xmlns="http://www.w3.org/2000/svg"
style={{ width: 32, height: 28 }} width={34.395}
/> height={31.5}
>
<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="#86a0b9"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
data-name="vuesax/linear/music-playlist"
/>
<Path
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="#86a0b9"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
</G>
</Svg>
), ),
}} }}
/> />
@ -132,15 +236,45 @@ const BottomTabNavigator = () => {
title: "کتابها", title: "کتابها",
tabBarIcon: ({ focused, color }) => tabBarIcon: ({ focused, color }) =>
focused ? ( focused ? (
<Image <Svg
source={bookActiveIcon} xmlns="http://www.w3.org/2000/svg"
style={{ width: 35, height: 34 }} width={35.135}
/> 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="#06bace"
/>
<Path
data-name="Vector"
d="M17.567 8.851v20.774M29.213 12.298h-3.294M29.159 16.643h-4.392"
fill="none"
stroke="#fff"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
</Svg>
) : ( ) : (
<Image <Svg
source={bookDeactiveIcon} xmlns="http://www.w3.org/2000/svg"
style={{ width: 35, height: 34 }} width={35.135}
/> height={34.763}
>
<G
fill="none"
stroke="#86a0b9"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
>
<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"
d="M17.567 7.666v21.959M29.213 12.298h-3.294M29.159 16.643h-4.392"
/>
</G>
</Svg>
), ),
}} }}
/> />
@ -151,15 +285,49 @@ const BottomTabNavigator = () => {
title: "خانه", title: "خانه",
tabBarIcon: ({ focused, color }) => tabBarIcon: ({ focused, color }) =>
focused ? ( focused ? (
<Image <Svg
source={homeActiveIcon} xmlns="http://www.w3.org/2000/svg"
style={{ width: 33, height: 33 }} width={33.58}
/> 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="#06bace"
/>
<Path
data-name="Vector"
d="M16.79 25.471v-6.693"
fill="none"
stroke="#fff"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
</Svg>
) : ( ) : (
<Image <Svg
source={homeDeactiveIcon} xmlns="http://www.w3.org/2000/svg"
style={{ width: 33, height: 33 }} width={33.58}
/> 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="none"
stroke="#86a0b9"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
<Path
data-name="Vector"
d="M16.79 25.471v-6.693"
fill="none"
stroke="#86a0b9"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
</Svg>
), ),
}} }}
/> />
@ -204,6 +372,16 @@ const VODStackScreen = () => {
); );
}; };
const CARTStack = createNativeStackNavigator();
const CARTStackScreen = () => {
return (
<CARTStack.Navigator screenOptions={{ headerShown: false }}>
<CARTStack.Screen name="ShoppingCart" component={ShoppingCart} />
<CARTStack.Screen name="DeliveryForm" component={DeliveryForm} />
</CARTStack.Navigator>
);
}
const AuthStack = createNativeStackNavigator(); const AuthStack = createNativeStackNavigator();
const AuthStackScreen = () => { const AuthStackScreen = () => {
return ( return (

@ -22,6 +22,7 @@
"expo-app-loading": "~1.3.0", "expo-app-loading": "~1.3.0",
"expo-av": "^10.2.0", "expo-av": "^10.2.0",
"expo-barcode-scanner": "~11.2.0", "expo-barcode-scanner": "~11.2.0",
"expo-blur": "~11.0.0",
"expo-camera": "~12.1.0", "expo-camera": "~12.1.0",
"expo-device": "~4.1.0", "expo-device": "~4.1.0",
"expo-font": "^10.0.4", "expo-font": "^10.0.4",
@ -42,6 +43,7 @@
"react-native-safe-area-context": "3.3.2", "react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1", "react-native-screens": "~3.10.1",
"react-native-select-dropdown": "^1.6.0", "react-native-select-dropdown": "^1.6.0",
"react-native-svg": "^12.1.1",
"react-native-web": "0.17.1", "react-native-web": "0.17.1",
"react-navigation-stack": "^2.10.4", "react-navigation-stack": "^2.10.4",
"react-redux": "^7.2.6", "react-redux": "^7.2.6",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

@ -0,0 +1,16 @@
import React from "react";
import { BlurView } from "expo-blur";
import { ActivityIndicator } from "react-native";
import tw from 'tailwind-rn';
export default function Blur() {
return (
<BlurView
intensity={280}
// tint="dark"
style={[{ width: "100%", height: "100%" }, tw('flex-1 flex justify-center items-center')]}
>
<ActivityIndicator size="large" color="#12CF7F" />
</BlurView>
);
}

@ -1,21 +1,25 @@
import { View, Text, ScrollView, Dimensions } from "react-native"; import { View, Text, ScrollView, Dimensions, Appearance } from "react-native";
import Divider from "../Divider"; import Divider from "../Divider";
import React from "react"; import React from "react";
//style
import fontSize from "../../constants/fontSize"; import fontSize from "../../constants/fontSize";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import Colors from "../../constants/Colors";
const { width } = Dimensions.get("window"); const { width } = Dimensions.get("window");
const ProductQuestion = ({ list }) => { const ProductQuestion = ({ list }) => {
const colorScheme = Appearance.getColorScheme();
const Question = ({ question }) => { const Question = ({ question }) => {
return ( return (
<View style={[tw("flex flex-col mb-3")]}> <View style={[tw("flex flex-col mb-3")]}>
<Text <Text
style={{ style={{
fontFamily: "regular", fontFamily: "regular",
color: "#196EC0", color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.base, fontSize: fontSize.lg,
}} }}
> >
سوال سوال
@ -24,7 +28,7 @@ const ProductQuestion = ({ list }) => {
style={{ style={{
fontFamily: "regular", fontFamily: "regular",
color: "#323232", color: "#323232",
fontSize: fontSize.base, fontSize: fontSize.tiny,
}} }}
> >
{question.question} {question.question}
@ -34,8 +38,8 @@ const ProductQuestion = ({ list }) => {
<Text <Text
style={{ style={{
fontFamily: "regular", fontFamily: "regular",
color: "#196EC0", color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.base, fontSize: fontSize.lg,
marginTop: 10, marginTop: 10,
}} }}
> >
@ -44,8 +48,8 @@ const ProductQuestion = ({ list }) => {
<Text <Text
style={{ style={{
fontFamily: "light", fontFamily: "light",
color: "#7A7A7A", color: Colors.theme1[colorScheme].grayCC,
fontSize: fontSize.base, fontSize: fontSize.tiny,
}} }}
> >
{question.question} {question.question}
@ -66,16 +70,16 @@ const ProductQuestion = ({ list }) => {
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4" "flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4"
), ),
{ {
backgroundColor: "#50A9FF33", backgroundColor: Colors.theme1[colorScheme].greenFF1,
}, },
]} ]}
> >
<Text <Text
style={[ style={[
{ {
fontSize: fontSize.base, fontSize: fontSize.lg,
color: "#275077", color: Colors.theme1[colorScheme].green79,
fontFamily: "regular", fontFamily: "bold",
}, },
]} ]}
> >

@ -1,12 +1,16 @@
import { View, Text, ScrollView, Dimensions } from "react-native"; import { View, Text, ScrollView, Dimensions, Appearance } from "react-native";
import React from "react"; import React from "react";
//style
import fontSize from "../../constants/fontSize"; import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
const { width } = Dimensions.get("window"); const { width } = Dimensions.get("window");
const ProductReviews = ({ list }) => { const ProductReviews = ({ list }) => {
const colorScheme = Appearance.getColorScheme();
const Property = ({ question }) => { const Property = ({ question }) => {
return ( return (
<View style={[tw("flex flex-col mb-3")]}> <View style={[tw("flex flex-col mb-3")]}>
@ -17,16 +21,16 @@ const ProductReviews = ({ list }) => {
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4" "flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4"
), ),
{ {
backgroundColor: "#ECFDFF", backgroundColor: Colors.theme1[colorScheme].greenFF1 + '66',
}, },
]} ]}
> >
<Text <Text
style={[ style={[
{ {
fontSize: fontSize.base, fontSize: fontSize.tiny,
color: "#275077", color: Colors.theme1[colorScheme].green79,
fontFamily: "regular", fontFamily: "bold",
}, },
]} ]}
> >
@ -35,9 +39,10 @@ const ProductReviews = ({ list }) => {
</View> </View>
<Text <Text
style={{ style={{
fontSize: fontSize.base, fontSize: fontSize.tiny,
fontFamily: "light", fontFamily: "light",
color: "#275077", color: "#275077",
lineHeight: 25
}} }}
> >
{question.text} {question.text}
@ -70,15 +75,15 @@ const ProductReviews = ({ list }) => {
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-2" "flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-2"
), ),
{ {
backgroundColor: "#50A9FF33", backgroundColor: Colors.theme1[colorScheme].greenFF1 ,
}, },
]} ]}
> >
<Text <Text
style={[ style={[
{ {
fontSize: fontSize.base, fontSize: fontSize.lg,
color: "#275077", color: Colors.theme1[colorScheme].green79,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}

@ -1,12 +1,16 @@
import { View, Text, ScrollView, Dimensions } from "react-native"; import { View, Text, ScrollView, Dimensions, Appearance } from "react-native";
import React from "react"; import React from "react";
//style
import fontSize from "../../constants/fontSize"; import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
const { width } = Dimensions.get("window"); const { width } = Dimensions.get("window");
const ProductSpecifications = ({ list }) => { const ProductSpecifications = ({ list }) => {
const colorScheme = Appearance.getColorScheme();
const Property = ({ prop }) => { const Property = ({ prop }) => {
return ( return (
<View style={[tw("flex flex-row-reverse mb-3")]}> <View style={[tw("flex flex-row-reverse mb-3")]}>
@ -21,7 +25,7 @@ const ProductSpecifications = ({ list }) => {
tw("py-3 pr-2"), tw("py-3 pr-2"),
{ {
fontFamily: "regular", fontFamily: "regular",
fontSize: fontSize.base, fontSize: fontSize.tiny,
color: "#07AFAF", color: "#07AFAF",
}, },
]} ]}
@ -60,15 +64,15 @@ const ProductSpecifications = ({ list }) => {
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4" "flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4"
), ),
{ {
backgroundColor: "#50A9FF33", backgroundColor: Colors.theme1[colorScheme].greenFF1 ,
}, },
]} ]}
> >
<Text <Text
style={[ style={[
{ {
fontSize: fontSize.base, fontSize: fontSize.lg,
color: "#275077", color: Colors.theme1[colorScheme].green79 ,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}

@ -1,8 +1,18 @@
import React, {useState} from 'react'; import React, { useState } from "react";
import {TextInput, View, Text, Dimensions, StyleSheet} from 'react-native'; import {
import tw from 'tailwind-rn'; TextInput,
View,
Text,
Dimensions,
StyleSheet,
useColorScheme,
} from "react-native";
import tw from "tailwind-rn";
const width = Dimensions.get('window').width; import Colors from "../constants/Colors";
import fontSize from "../constants/fontSize";
const width = Dimensions.get("window").width;
const FloatingLabelInput = ({ const FloatingLabelInput = ({
label, label,
@ -18,34 +28,40 @@ const FloatingLabelInput = ({
regex, regex,
...props ...props
}) => { }) => {
const colorScheme = useColorScheme();
const [isFocused, setIsFocused] = useState(false); const [isFocused, setIsFocused] = useState(false);
const styles = StyleSheet.create({ const styles = StyleSheet.create({
labelStyle: { labelStyle: {
fontFamily: 'regular', fontFamily: "regular",
top: !isFocused ? '50%' : 1, top: !isFocused ? "50%" : 1,
fontSize: !isFocused ? width / 36 : width / 40, fontSize: !isFocused ? fontSize.base : fontSize.sm,
transform: [{translateY: -width / 35}], transform: [{ translateY: -width / 35 }],
color: !isFocused ? '#555' : '#196EC0', color: !isFocused ? "#555" : Colors.theme1[colorScheme].greenC8,
}, },
inputStyle: { inputStyle: {
fontSize: Dimensions.get('window').width / 27, fontSize: fontSize.lg,
color: '#000', color: Colors.theme1[colorScheme].black,
borderWidth: 1, borderWidth: 1,
borderColor: isFocused ? '#196EC0' : '#777', borderColor: isFocused ? Colors.theme1[colorScheme].greenC8 : "#777",
textAlign: textAlign, textAlign: textAlign,
fontFamily: 'light' fontFamily: "light",
fontWeight : "900"
}, },
}); });
return ( return (
<View style={tw('mt-4')}> <View style={tw("mt-4")}>
<Text <Text
style={[styles.labelStyle, tw('px-1 z-10 bg-white absolute right-4 text-center')]}> style={[
styles.labelStyle,
tw("px-1 z-10 bg-white absolute right-4 text-center"),
]}
>
{label} {label}
</Text> </Text>
<TextInput <TextInput
style={[styles.inputStyle , tw('rounded-md p-2') ]} style={[styles.inputStyle, tw("rounded-md p-2")]}
onChangeText={text => onChange(name, text = regex(text))} onChangeText={(text) => onChange(name, (text = regex(text)))}
placeholder={'09123456789'} placeholder={"09123456789"}
onFocus={() => setIsFocused(true)} onFocus={() => setIsFocused(true)}
autoFocus={autoFocus} autoFocus={autoFocus}
underlineColorAndroid={"transparent"} underlineColorAndroid={"transparent"}

@ -60,6 +60,13 @@ const Drawer = ({ position, setBoxPosition }) => {
toast: "", toast: "",
message: "", message: "",
}, },
{
name: "سبد خرید",
route: "ShoppingCart",
icon: <Ionicons name="cart" size={23} color={"#555555"} />,
toast: "",
message: "",
},
{ {
name: "سوالات متداول", name: "سوالات متداول",
route: "Faq", route: "Faq",
@ -73,7 +80,7 @@ const Drawer = ({ position, setBoxPosition }) => {
icon: <Ionicons name="call" size={23} color={"#555555"} />, icon: <Ionicons name="call" size={23} color={"#555555"} />,
toast: "", toast: "",
message: "", message: "",
} },
]); ]);
const navigation = useNavigation(); const navigation = useNavigation();
const Route = ({ route }) => { const Route = ({ route }) => {

@ -0,0 +1,18 @@
import { View, Dimensions } from "react-native";
import React from "react";
import tw from "tailwind-rn";
const { width, height } = Dimensions.get("window");
const ImageSlider = ({}) => {
return (
<View
style={[
tw("flex flex-row justify-center items-center absolute left-0 top-0"),
{ width : width, height : height, backgroundColor: "black", zIndex : 1 },
]}
></View>
);
};
export default ImageSlider;

File diff suppressed because one or more lines are too long

@ -1,7 +1,8 @@
import React from 'react'; import React from "react";
import {TouchableOpacity, Text} from 'react-native'; import { TouchableOpacity, Text, ActivityIndicator } from "react-native";
import tw from 'tailwind-rn'; import tw from "tailwind-rn";
import fontSize from '../constants/fontSize'; import fontSize from "../constants/fontSize";
export default function Pressable1({ export default function Pressable1({
title, title,
backgroundColor, backgroundColor,
@ -9,20 +10,30 @@ export default function Pressable1({
border, border,
width, width,
onPress, onPress,
loading,
}) { }) {
return ( return (
<TouchableOpacity <TouchableOpacity
onPress={() => onPress()} onPress={() => onPress()}
style={[ style={[
tw('rounded-md py-3 flex flex-row justify-center mb-3'), tw("rounded-md py-3 flex flex-row justify-center mb-3"),
{ {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
borderWidth: border.width, borderWidth: border.width,
borderColor: border.color, borderColor: border.color,
width : width, width: width,
}, },
]}> ]}
<Text style={{fontSize: fontSize.base, color: color, fontFamily : 'regular'}}>{title}</Text> >
{loading ? (
<ActivityIndicator size="small" color={color} />
) : (
<Text
style={{ fontSize: fontSize.lg, color: color, fontFamily: "bold" }}
>
{title}
</Text>
)}
</TouchableOpacity> </TouchableOpacity>
); );
} }

@ -1,11 +1,14 @@
import React, {useState, useEffect} from 'react'; import React, {useState, useEffect} from 'react';
import {View} from 'react-native'; import {View, Appearance } from 'react-native';
import tw from 'tailwind-rn'; import tw from 'tailwind-rn';
import Colors from "../constants/Colors";
//Color //Color
import Color from '../constants/Colors'; import Color from '../constants/Colors';
function Progress({percent, alignItems}) { function Progress({percent, alignItems}) {
const colorScheme = Appearance.getColorScheme();
const [delayPercent, setDelayPercent] = useState(0); const [delayPercent, setDelayPercent] = useState(0);
useEffect(() => { useEffect(() => {
setTimeout(() => { setTimeout(() => {
@ -16,13 +19,13 @@ function Progress({percent, alignItems}) {
<View <View
style={[ style={[
tw(`w-full h-1.5 rounded-full overflow-hidden my-3 flex ${alignItems}`), tw(`w-full h-1.5 rounded-full overflow-hidden my-3 flex ${alignItems}`),
{backgroundColor: '#D3E9FF'}, {backgroundColor: Colors.theme1[colorScheme].green79 + '22'},
]}> ]}>
<View <View
style={[ style={[
tw('h-full rounded-full'), tw('h-full rounded-full'),
{ {
backgroundColor: Color.theme1.light.blue5, backgroundColor: Color.theme1[colorScheme].greenCF,
width: percent + '%', width: percent + '%',
// backgroundColor: Color.theme1.light.blue4, // backgroundColor: Color.theme1.light.blue4,
}, },

@ -5,12 +5,17 @@ import {
Dimensions, Dimensions,
StyleSheet, StyleSheet,
Pressable, Pressable,
Image, Appearance
} from 'react-native'; } from 'react-native';
import tw from 'tailwind-react-native-classnames'; import tw from 'tailwind-rn';
import { AntDesign } from '@expo/vector-icons'; import { AntDesign } from '@expo/vector-icons';
//style
import Colors from "../constants/Colors";
import fontSize from '../constants/fontSize';
const width = Dimensions.get('window').width; const width = Dimensions.get('window').width;
const Search = ({ const Search = ({
placeholder, placeholder,
textAlign, textAlign,
@ -18,31 +23,32 @@ const Search = ({
onChange, onChange,
value, value,
}) => { }) => {
const colorScheme = Appearance.getColorScheme();
const styles = StyleSheet.create({ const styles = StyleSheet.create({
inputStyle: { inputStyle: {
fontSize: width / 36, fontSize: fontSize.tiny,
color: '#000', color: Colors.theme1[colorScheme].gray2077,
borderWidth: 0.5, borderWidth: 0.5,
borderColor: '#DBDBDB', borderColor: Colors.theme1[colorScheme].gray2077,
paddingVertical: 4, paddingVertical: 4,
paddingHorizontal: 10, paddingHorizontal: 10,
direction: direction, direction: direction,
textAlign: textAlign, textAlign: textAlign,
backgroundColor: '#F9F9F9', backgroundColor: Colors.theme1[colorScheme].grayF9,
fontFamily : 'light' fontFamily : 'regular'
}, },
}); });
return ( return (
<View style={[{marginTop: 18}, tw.style('w-full relative')]}> <View style={[{marginTop: 18}, tw('w-full relative')]}>
<TextInput <TextInput
style={[styles.inputStyle, tw.style('rounded-md')]} style={[styles.inputStyle, tw('rounded-md')]}
onChangeText={text => onChange(text)} onChangeText={text => onChange(text)}
placeholder={placeholder} placeholder={placeholder}
placeholderTextColor={'#cccccc'} placeholderTextColor={Colors.theme1[colorScheme].grayCC}
value={value} value={value}
/> />
<Pressable style={tw.style('absolute left-3 top-0 inset-y-2')}> <Pressable style={tw('absolute left-3 top-0 inset-y-2')}>
<AntDesign name="search1" size={18} color="#196EC0" /> <AntDesign name="search1" size={18} color="#52796F" />
</Pressable> </Pressable>
</View> </View>
); );

@ -1,40 +1,69 @@
import React from 'react'; import React from "react";
import {Image, Dimensions} from 'react-native'; import { Appearance } from "react-native";
import SelectDropdown from 'react-native-select-dropdown'; import Svg, { Path } from "react-native-svg";
import dropdownIcon from '../assets/icons/dropdown.png'; import SelectDropdown from "react-native-select-dropdown";
import tw from 'tailwind-react-native-classnames';
//styles
import fontSize from "../constants/fontSize";
import Colors from "../constants/Colors";
function Select({
iconPosition,
options,
onChange,
name,
value,
width,
defaultValue,
}) {
const colorScheme = Appearance.getColorScheme();
function Select({iconPosition, options, onChange, value, width, defaultValue}) {
return ( return (
<SelectDropdown <SelectDropdown
data={options} data={options}
buttonStyle={{ buttonStyle={{
width: width, width: width,
borderWidth: 1, borderWidth: 1,
borderColor: '#DBDBDB', borderColor: Colors.theme1[colorScheme].gray2077 + "66",
borderRadius: 6, borderRadius: 6,
height: 36, height: 36,
backgroundColor: '#F9F9F9', backgroundColor: Colors.theme1[colorScheme].grayF9,
fontFamily : 'light' fontFamily: "regular",
}}
rowTextStyle={{
fontSize: fontSize.sm,
fontFamily: "regular",
}} }}
rowTextStyle={{fontSize: Dimensions.get('window').width / 36, fontFamily : 'light'}}
defaultButtonText={defaultValue} defaultButtonText={defaultValue}
statusBarTranslucent={true} statusBarTranslucent={true}
buttonTextStyle={{ buttonTextStyle={{
textAlign: 'center', textAlign: "center",
justifyContent: 'flex-end', justifyContent: "flex-end",
flex: 0, flex: 0,
fontSize: Dimensions.get('window').width / 36, fontSize: fontSize.sm,
color: '#707070', color: Colors.theme1[colorScheme].gray2077,
fontFamily : 'light' fontFamily: "regular",
// display: 'inline' // display: 'inline'
}} }}
dropdownIconPosition={iconPosition} dropdownIconPosition={iconPosition}
onSelect={selectedItem => { onSelect={(selectedItem) => {
onChange(selectedItem); onChange(name, selectedItem);
}} }}
renderDropdownIcon={() => ( renderDropdownIcon={() => (
<Image source={dropdownIcon} style={{width: 12, height: 8}} /> <Svg
data-name="vuesax/linear/arrow-down"
xmlns="http://www.w3.org/2000/svg"
width={16.081}
height={16.081}
>
<Path
d="m13.347 5.997-4.368 4.369a1.331 1.331 0 0 1-1.876 0L2.734 5.997"
fill="none"
stroke={Colors.theme1[colorScheme].gray2077 + "66"}
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
</Svg>
)} )}
/> />
); );
@ -43,6 +72,6 @@ function Select({iconPosition, options, onChange, value, width, defaultValue}) {
export default Select; export default Select;
Select.defaultProps = { Select.defaultProps = {
options: ['1', '2', '3'], options: ["1", "2", "3"],
iconPosition: 'left', iconPosition: "left",
}; };

@ -1,20 +1,87 @@
const Colors = { const Colors = {
theme1 : { theme1: {
light : { light: {
blue1 : '#E9F0FF', //green
blue2 : '#D7E3FC', green79: "#52796F",
blue3 : '#D3E9FF', greenBA: "#06BAC0",
blue4 : '#2B8DEB', greenC8: "#76C893",
blue5 : "#196EC0", greenCF: "#12CF7F",
blue6 : '#05335F', greenD9: "#99D98C",
blue7 : '#235A90', greenDD: "#D5DDBC",
blue8 : '#86A0B9', greenFF: "#00FF80",
greenFF1: "#DEFFF1",
//blue
blue90: "#235A90",
blueCB: "#98B2CB",
blueEB: "#2B8DEB",
blueFA: "#F8F9FA",
blueFA1: "#9CF1FA",
blueFD: "#F6F9FD",
blueFD1: "#F4F8FD",
blueFDOP: "rgba(6, 146, 255, 0.36)",
blueFF: "#E8FCFF",
blueFF1: "#E9F0FF",
//gray
gray20: "#202020",
gray2077: "#2F3E46",
grayE3: "#E3E3E3",
grayF9: "#F9F9F9",
grayCC : "#CCC",
//red
redC0: "#C01919",
redFF: "#FFE6E6",
redFF1: "#FF2020",
//yellow
yellow2: "#FDFFDA",
yellow3: "#EFFF00",
yellow4: "#FFEE00",
//orange
orange1: "#FF6600",
//black
black: "#000000",
white: "#FFFFFF"
}, },
dark : { dark: {
//green
} green79: "#52796F",
} greenBA: "#06BAC0",
greenC8: "#76C893",
greenCF: "#12CF7F",
greenD9: "#99D98C",
greenDD: "#D5DDBC",
greenFF: "#00FF80",
greenFF1: "#DEFFF1",
//blue
blue90: "#235A90",
blueCB: "#98B2CB",
blueEB: "#2B8DEB",
blueFA: "#F8F9FA",
blueFA1: "#9CF1FA",
blueFD: "#F6F9FD",
blueFD1: "#F4F8FD",
blueFDOP: "rgba(6, 146, 255, 0.36)",
blueFF: "#E8FCFF",
blueFF1: "#E9F0FF",
//gray
gray20: "#202020",
gray2077: "#2F3E46",
grayE3: "#E3E3E3",
grayF9: "#F9F9F9",
//red
redC0: "C01919",
redFF: "#FFE6E6",
redFF1: "#FF2020",
//yellow
yellow2: "#FDFFDA",
yellow3: "#EFFF00",
yellow4: "#FFEE00",
//orange
orange1: "#FF6600",
//black
black: "#FFFFFF",
white: "#000000"
},
},
}; };
export default Colors; export default Colors;

@ -10,35 +10,9 @@ const book = {
await proxy.get("book/info", data, { dispatch }), await proxy.get("book/info", data, { dispatch }),
setLessonActive: (data) => async (dispatch) => setLessonActive: (data) => async (dispatch) =>
await dispatch({ type: "book/lesson/active", data: data }), await dispatch({ type: "book/lesson/active", data: data }),
gradeFilter: (data) => async (dispatch) => setFilterOptions: (data) => async (dispatch) => {
await dispatch({ type: "book/gradeFilter", data: data }), dispatch({ type: "book/setFilterOptions", data: data });
sortFilter: (data) => async (dispatch) => },
await dispatch({ type: "book/sortFilter", data: data }),
// update:
// (data = {}, data2 = {}) =>
// async (dispatch : Dispatch) => {
// await proxy.put("book/update", data);
// await proxy.get("book/list", data2, { dispatch });
// },
// add:
// (data = {}, data2 = {}) =>
// async (dispatch) => {
// await proxy.post("book/add", data);
// await proxy.get("book/list", data2, { dispatch });
// },
// del:
// (data = {}, data2 = {}) =>
// async (dispatch) => {
// await proxy.delete("book/delete", data);
// await proxy.get("book/list", data2, { dispatch });
// },
// searchBook: (data) => async (dispatch) => {
// dispatch({ type: "book/search", data: data });
// },
// filterBook: (data) => async (dispatch) => {
// dispatch({ type: "book/filter", data: data });
// },
}; };
export default book; export default book;

@ -9,4 +9,5 @@ export { default as userProduct } from "./userProduct";
export { default as content } from "./content"; export { default as content } from "./content";
export { default as faq } from "./faq"; export { default as faq } from "./faq";
export { default as file } from "./file"; export { default as file } from "./file";
export { default as qr } from "./qr"; export { default as qr } from "./qr";
export {default as userAddress} from "./userAddress";

@ -0,0 +1,34 @@
import proxy from "../proxy";
const userAddress = {
list:
(data = {}) =>
async (dispatch) => {
await proxy.get("userAddress/list", data, { dispatch });
},
info:
(data = {}) =>
async (dispatch) => {
await dispatch({ type: "userAddress/info", data });
},
update:
(data = {}, data2 = {}) =>
async (dispatch) => {
await proxy.put("userAddress/update", data);
await proxy.get("userAddress/list", data2, { dispatch });
},
add:
(data = {}, data2 = {}, data3 = {}) =>
async (dispatch) => {
await proxy.post("userAddress/add", data, { dispatch });
await proxy.get("userAddress/list", data2, { dispatch });
},
del:
(data = {}, data2 = {}) =>
async (dispatch) => {
await proxy.delete("userAddress/delete", data);
await proxy.get("userAddress/list", data2, { dispatch });
},
};
export default userAddress;

@ -1,4 +1,3 @@
const initialState = { const initialState = {
loading: false, loading: false,
error: null, error: null,
@ -14,6 +13,20 @@ const initialState = {
sortFilterCourse: null, sortFilterCourse: null,
selectedGrade: null, selectedGrade: null,
selectedSort: "پربازدید ترین ها", selectedSort: "پربازدید ترین ها",
filterOptions: {
grade: "",
subject: "",
productType: '',
available: false,
sort: null,
search: "",
},
productTypes: [
"کتاب فیزیکی",
"کتاب دیجیتال",
"دوره ویدئویی",
"بسته های آموزشی",
],
}; };
const grades = [ const grades = [
@ -39,23 +52,20 @@ export default function book(state = initialState, action) {
let itemsSubject = (Array.isArray(data) ? data : []).map( let itemsSubject = (Array.isArray(data) ? data : []).map(
(item, index) => item.name (item, index) => item.name
); );
if (window.innerWidth < 1000) { itemsSubject.unshift("نام کتاب");
itemsSubject.unshift("نام کتاب");
}
let itemsLevel = (Array.isArray(data) ? data : []) let itemsLevel = (Array.isArray(data) ? data : [])
.map((item) => item.gradeId * 1) .map((item) => item.gradeId * 1)
.sort((a, b) => a - b) .sort((a, b) => a - b)
.map((e) => grades[e]); .map((e) => grades[e]);
if (window.innerWidth < 1000) { itemsLevel.unshift("پایه تحصیلی");
itemsLevel.unshift("پایه تحصیلی");
}
return { return {
...state, ...state,
loading: false, loading: false,
list: data, list: data,
subjects: Array.from(new Set(itemsSubject)), subjects: Array.from(new Set(itemsSubject)),
levels: Array.from(new Set(itemsLevel)), levels: Array.from(new Set(itemsLevel)),
filterResult: data,
error: null, error: null,
}; };
case "book/info": case "book/info":
@ -66,96 +76,9 @@ export default function book(state = initialState, action) {
loading: false, loading: false,
error: null, error: null,
}; };
case "book/gradeFilter":
if (data === state.selectedGrade) {
return { ...state, gradeFilterBooks: null, selectedGrade: null };
} else {
return {
...state,
gradeFilterBooks: state.list.filter(
(item, i) => grades[item.gradeId] === data
),
selectedGrade: data,
};
}
case "book/sortFilter":
const search = state.list.filter(
(item) => item.name.indexOf(data.search) !== -1
);
if (data.sort === "تمامی دورهها") {
return { ...state, sortFilterCourse: search, selectedSort: data.sort };
} else if (data.sort === "جدیدترینها") {
return {
...state,
sortFilterCourse: search.sort((item1, item2) => {
return item1.publishYear - item2.publishYear;
}),
selectedSort: data.sort,
};
}
return { ...state, sortFilterCourse: search, selectedSort: data.sort };
// case "book/update":
// return { ...state, loading: false, error: null };
// case "book/add":
// return { ...state, loading: false, error: null };
// case "book/delete":
// return { ...state, loading: false, error: null };
// case "book/search":
// return { ...state };
// case "book/filter":
// const realList = state.list;
// const level = data.level;
// const subject = data.subject;
// const sort = data.sort;
// const search = data.search;
// if (level.length > 0 || subject.length > 0 || sort || search) {
// localStorage.setItem("filter", "ON");
// }
// let finalSort;
// let byLevelFilter = [];
// if (level.length > 0) {
// level.map((item1) => {
// for (let i = 0; i < realList.length; i++) {
// if (grades[realList[i].gradeId] === item1) {
// byLevelFilter.push(realList[i]);
// }
// }
// });
// } else {
// byLevelFilter = realList;
// }
// let bySubjectFilter = [];
// if (subject.length > 0) {
// subject.map((item1) => {
// for (let i = 0; i < byLevelFilter.length; i++) {
// if (byLevelFilter[i].name === item1) {
// bySubjectFilter.push(byLevelFilter[i]);
// }
// }
// });
// } else {
// bySubjectFilter = byLevelFilter;
// }
// const bySearchFilter = search
// ? bySubjectFilter.filter((item1) => item1.name.indexOf(search) !== -1)
// : bySubjectFilter;
// if (sort === "گران ترین") { case "book/setFilterOptions":
// finalSort = bySearchFilter.sort((item1, item2) => { return { ...state, loading: false, error: null, filterOptions: data };
// return item1.product[0].price - item2.product[0].price;
// });
// } else {
// finalSort = bySearchFilter;
// }
// return {
// ...state,
// loading: false,
// error: null,
// filterResult: finalSort,
// };
case "book/loading": case "book/loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "book/error": case "book/error":

@ -8,4 +8,5 @@ export { default as faq } from "./faq";
export { default as file } from "./file"; export { default as file } from "./file";
export { default as userFactor } from "./userFactor"; export { default as userFactor } from "./userFactor";
export { default as userProduct } from "./userProduct"; export { default as userProduct } from "./userProduct";
import { default as qr } from "./qr"; import { default as qr } from "./qr";
export { default as userAddress } from "./userAddress";

@ -105,7 +105,7 @@ const publicApi = (state = initialState, action) => {
allCats = Array.from( allCats = Array.from(
new Set(data.vods.map((item) => item.categoryId && item.categoryId)) new Set(data.vods.map((item) => item.categoryId && item.categoryId))
); );
allCats.sort((a , b) => a - b); allCats.sort((a, b) => a - b);
return { return {
...state, ...state,
loading: false, loading: false,
@ -168,4 +168,4 @@ const publicApi = (state = initialState, action) => {
} }
}; };
export default publicApi; export default publicApi;

@ -0,0 +1,32 @@
const initialState = {
loading: false,
error: null,
list: [],
info : null,
};
export default function userAddress(state = initialState, action) {
let { type, data } = action;
switch (type) {
case "userAddress/list":
return {
...state,
loading: false,
list: data,
error: null,
};
case "userAddress/info":
return { ...state, loading: false, info: data, error: null };
case "userAddress/update":
return { ...state, loading: false, error: null };
case "userAddress/add":
return { ...state, loading: false, error: null, sum: data.payPrice };
case "userAddress/delete":
return { ...state, loading: false, error: null };
case "userAddress/loading":
return { ...state, loading: true };
case "userAddress/error":
return { ...state, loading: false, error: data.message };
default:
return state;
}
}

@ -0,0 +1,12 @@
import { View, Text } from 'react-native'
import React from 'react'
const Address = () => {
return (
<View>
<Text>Address</Text>
</View>
)
}
export default Address;

@ -0,0 +1,12 @@
import { View, Text } from 'react-native'
import React from 'react'
const Address = () => {
return (
<View>
<Text>Address</Text>
</View>
)
}
export default Address

@ -0,0 +1,12 @@
import { View, Text } from 'react-native'
import React from 'react'
const PaymentMethod = () => {
return (
<View>
<Text>PaymentMethod</Text>
</View>
)
}
export default PaymentMethod

@ -0,0 +1,12 @@
import { View, Text } from 'react-native'
import React from 'react'
const TransportDate = () => {
return (
<View>
<Text>TransportDate</Text>
</View>
)
}
export default TransportDate

@ -0,0 +1,12 @@
import { View, Text } from 'react-native'
import React from 'react'
const TransportMethod = () => {
return (
<View>
<Text>TransportMethod</Text>
</View>
)
}
export default TransportMethod

@ -0,0 +1,104 @@
import {
View,
Text,
SafeAreaView,
ScrollView,
StyleSheet,
StatusBar,
Platform,
Dimensions,
} from "react-native";
import React from "react";
import { connect } from "react-redux";
import { userFactor, userAddress } from "../../redux/actions";
import { useNavigation } from "@react-navigation/native";
//components
import Navbar from "../../components/Navbar";
import TransportMethod from "./PaymentMethod";
import TransportDate from "./TransportDate";
// import PaymentMethod from "./PaymentMethod";
import Address from "./Address";
//style
import tw from "tailwind-rn";
const DeliveryForm = ({ list }) => {
const navigation = useNavigation();
return (
<SafeAreaView
style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative",
}}
>
<Navbar
setBoxPosition={setBoxPosition}
headerOptions={{
logo: false,
menu: true,
hamburgerMenu: false,
title: "",
bookmark: true,
qr: false,
back: true,
}}
/>
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={styles.container}
>
<View style={tw("w-full flex flex-col pt-4 pb-4")}>
<View style={tw("w-full flex flex-row gap-5")}>
<Address addresses={list} />
</View>
<View style={tw("w-full flex flex-row gap-5 mt-8")}>
<TransportMethod />
</View>
<View style={tw("w-full flex flex-row gap-5 mt-8")}>
<TransportDate transportDate={form.transportDate} />
</View>
<View
style={[
tw("flex justify-between items-center py-3 px-4 w-full"),
{ backgroundColor: "#061B30" },
]}
>
<Text style={tw("")}>تکمیل اطلاعات</Text>
{/* <Image
source={{ uri: isDark ? arrowWhiteIcon : arrowBlueIcon }}
style={tw(`w-6`)}
onPress={() => navigation.goBack()}
/> */}
</View>
</View>
</ScrollView>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 100,
},
container: {
width: Dimensions.get("window").width,
backgroundColor: "white",
flexDirection: "column",
paddingVertical: 5,
paddingHorizontal: 16,
},
});
const mapStateToProps = (state) => ({
factorInfo: state.userFactor.info,
userId: state.user.status?.id,
list: state.userAddress.list,
});
const mapDispatchToProps = {
getFactorInfo: userFactor.info,
getList: userAddress.list,
};
export default connect(mapStateToProps, mapDispatchToProps)(DeliveryForm);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 B

@ -6,20 +6,124 @@ import {
Dimensions, Dimensions,
TouchableOpacity, TouchableOpacity,
FlatList, FlatList,
Pressable
} from "react-native"; } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import Svg, { G, Path } from "react-native-svg";
//components
import Header from "../components/Header"; import Header from "../components/Header";
import fontSize from "../../../constants/fontSize";
//Style
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import Color from "../../../constants/Colors";
import fontSize from "../../../constants/fontSize";
//asssets //asssets
import userImage from "../assets/user.png"; import userImage from "../assets/user.png";
import messageIcon from "../assets/message.png";
//Color
import Color from "../../../constants/Colors";
const { width} = Dimensions.get("window"); const { width } = Dimensions.get("window");
function Blogs({ blogs }) { function Blogs({ blogs }) {
const Blog = ({ blog }) => {
return (
<Pressable
style={[
tw("rounded-md ml-3 rounded-md relative"),
{ width: width / 1.5 },
]}
// onPress={() => navigation.navigate('Product')}
>
<Image
source={{ uri: `https://dnvn.ir/api/v1/file/${blog.fileIds}` }}
style={[
tw("rounded-md"),
{ width: "100%", height: ((width / 1.5) * 9) / 16 },
]}
/>
<View
style={[
{ transform: [{ translateY: -20 }], marginHorizontal: 10 },
tw("flex flex-col bg-white rounded-md p-2"),
{
shadowColor: "#000",
shadowOffset: { width: 0, height: 1 },
shadowOpacity: 0.8,
shadowRadius: 2,
elevation: 5,
},
]}
>
<Text
style={[
tw("mb-2"),
{
color: Color.theme1.light.blue7,
fontFamily: "bold",
fontSize: fontSize.tiny,
},
]}
>
{blog.title}
</Text>
<View style={[tw("flex flex-row-reverse justify-between")]}>
<View style={tw("flex-row-reverse items-center")}>
<Image
source={userImage}
style={[tw("rounded-full ml-1"), { width: 16, height: 16 }]}
/>
<Text
style={[
{
color: Color.theme1.light.blue5,
fontFamily: "regular",
fontSize: fontSize.sm,
},
]}
>
حامد دژبانی نسب
</Text>
</View>
<View style={tw("flex-row-reverse items-center")}>
<Text
style={[
tw("ml-1"),
{
color: Color.theme1.light.blue5,
fontFamily: "regular",
fontSize: fontSize.sm,
},
]}
>
۳۰ دقیقه
</Text>
<Svg
xmlns="http://www.w3.org/2000/svg"
width={12.051}
height={12.051}
// {...props}
>
<G
fill="none"
stroke="#818181"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={0.5}
data-name="vuesax/linear/message"
>
<Path d="M4.268 9.54h-.251c-2.013 0-3.013-.502-3.013-3.013v-2.51a2.663 2.663 0 0 1 3.013-3.013h4.017a2.663 2.663 0 0 1 3.013 3.013v2.51A2.663 2.663 0 0 1 8.034 9.54h-.252a.509.509 0 0 0-.4.2l-.753 1a.713.713 0 0 1-1.205 0l-.753-1a.568.568 0 0 0-.403-.2Z" />
<Path
data-name="Vector"
d="M8.032 5.523h0M6.024 5.523h0M4.015 5.523h0"
/>
</G>
</Svg>
</View>
</View>
</View>
</Pressable>
);
};
return ( return (
<View style={[tw("flex flex-col pr-3 mb-5")]}> <View style={[tw("flex flex-col pr-3 mb-5")]}>
<View style={tw("w-full pl-3")}> <View style={tw("w-full pl-3")}>
@ -29,7 +133,7 @@ function Blogs({ blogs }) {
showsHorizontalScrollIndicator={false} showsHorizontalScrollIndicator={false}
horizontal={true} horizontal={true}
inverted={true} inverted={true}
style={[tw("flex flex-row mt-3")]} style={[tw("flex flex-row mt-3 pb-7")]}
data={blogs} data={blogs}
renderItem={({ item }) => <Blog blog={item} />} renderItem={({ item }) => <Blog blog={item} />}
keyExtractor={(item) => item.id} keyExtractor={(item) => item.id}
@ -38,80 +142,7 @@ function Blogs({ blogs }) {
); );
} }
const Blog = ({ blog }) => {
return (
<TouchableOpacity
style={[
tw("rounded-md ml-3 rounded-md relative"),
{ width: width / 1.5},
]}
// onPress={() => navigation.navigate('Product')}
>
<Image
source={{ uri: `https://dnvn.ir/api/v1/file/${blog.fileIds}` }}
style={[tw("rounded-md"), {width : '100%', height : width / 1.5 * 9 / 16}]}
/>
<View
style={[
{ transform: [{ translateY: -20 }], marginHorizontal: 10 },
tw("flex flex-col bg-white rounded-md p-2"),
]}
>
<Text
style={[
tw("mb-2"),
{
color: Color.theme1.light.blue7,
fontFamily: "bold",
fontSize: fontSize.sm,
},
]}
>
{blog.title}
</Text>
<View style={tw("flex flex-row-reverse justify-between")}>
<View style={tw("flex-row-reverse items-center")}>
<Image
source={userImage}
style={[tw("rounded-full ml-1"), { width: 13, height: 13 }]}
/>
<Text
style={[
{
color: Color.theme1.light.blue5,
fontFamily: "light",
fontSize: fontSize.xs,
},
]}
>
حامد دژبانی نسب
</Text>
</View>
<View style={tw("flex-row-reverse items-center")}>
<Text
style={[
{
color: Color.theme1.light.blue5,
fontFamily: "light",
fontSize: fontSize.xs,
},
]}
>
۳۰ دقیقه
</Text>
<Image
source={messageIcon}
style={[tw("rounded-full mr-1"), { width: 13, height: 13 }]}
/>
</View>
</View>
</View>
</TouchableOpacity>
);
};
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
// features: state.publicApi.home?.features, // features: state.publicApi.home?.features,
}); });
export default connect(mapStateToProps, {})(Blogs); export default connect(mapStateToProps, {})(Blogs);

@ -1,5 +1,5 @@
import React from "react"; import React from "react";
import { View, Text, Pressable } from "react-native"; import { View, Text, Pressable, Appearance } from "react-native";
import { Entypo } from "@expo/vector-icons"; import { Entypo } from "@expo/vector-icons";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import fontSize from "../../../constants/fontSize"; import fontSize from "../../../constants/fontSize";
@ -9,23 +9,24 @@ import tw from "tailwind-rn";
import Color from "../../../constants/Colors"; import Color from "../../../constants/Colors";
const Header = ({ title, route }) => { const Header = ({ title, route }) => {
const colorScheme = Appearance.getColorScheme();
const navigation = useNavigation(); const navigation = useNavigation();
return ( return (
<View style={tw("w-full flex flex-row-reverse justify-between mb-0")}> <View style={tw("w-full flex flex-row-reverse justify-between mb-0")}>
<Text <Text
style={[ style={[
{ {
color: Color.theme1.light.blue5, color: Color.theme1[colorScheme].green79,
fontFamily: "bold", fontFamily: "bold",
fontSize: fontSize.base, fontSize: fontSize.xl,
}, },
]} ]}
> >
{title} {title}
</Text> </Text>
{route ? ( {route ? (
<Pressable onPress={() => navigation.navigate(route)}> <Pressable onPress={() => navigation.navigate(route)} style={{transform: [{translateX : -fontSize.xl6 / 3}]}}>
<Entypo name="chevron-small-left" size={25} color="#196EC0" /> <Entypo name="chevron-small-left" size={fontSize.xl6} color={Color.theme1[colorScheme].green79} />
</Pressable> </Pressable>
) : null} ) : null}
</View> </View>

@ -5,10 +5,12 @@ import {
TouchableOpacity, TouchableOpacity,
Dimensions, Dimensions,
FlatList, FlatList,
Appearance,
} from "react-native"; } from "react-native";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import fontSize from '../../../constants/fontSize'; import fontSize from "../../../constants/fontSize";
import {useNavigation} from '@react-navigation/native'; import Colors from "../../../constants/Colors";
import { useNavigation } from "@react-navigation/native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import Progress from "../../../components/Progress"; import Progress from "../../../components/Progress";
@ -17,18 +19,65 @@ import Progress from "../../../components/Progress";
//Color //Color
import Color from "../../../constants/Colors"; import Color from "../../../constants/Colors";
const width = Dimensions.get("window").width;
const height = Dimensions.get("window").height;
function MyBooks({ books, grades }) { function MyBooks({ books, grades }) {
const colorScheme = Appearance.getColorScheme();
const Book = ({ book }) => {
const navigation = useNavigation();
return (
<TouchableOpacity
style={tw("flex flex-col ml-3")}
onPress={() => navigation.navigate("Product")}
>
<Image
source={{
uri: `https://dnvn.ir/api/v1/file/${book.product.book.fileIds}`,
}}
style={[
tw("rounded-md"),
{
height: 160,
width: 110,
},
]}
/>
<Text
style={[
tw("mt-2 pr-1"),
{
color: Color.theme1.light.blue6,
fontFamily: "bold",
fontSize: fontSize.base,
},
]}
>
{book.product.book.name}
</Text>
<Text
style={[
tw("pr-1"),
{
color: Color.theme1.light.blue5,
fontFamily: "light",
fontSize: fontSize.base,
},
]}
>
{"پایه" + " " + grades[book.product.book.gradeId]}
</Text>
<Progress percent={60} alignItems={"items-end"} />
</TouchableOpacity>
);
};
return ( return (
<View style={[tw("w-full px-4 mb-5")]}> <View style={[tw("w-full px-4 mb-5")]}>
<View <View
style={[ style={[
tw("w-full flex flex-col rounded-md pt-2 px-2 overflow-hidden"), tw("w-full flex flex-col rounded-md pt-3 px-2 overflow-hidden"),
{ {
backgroundColor: Color.theme1.light.blue1, backgroundColor: Color.theme1[colorScheme].greenCF + "0F",
borderColor: Color.theme1.light.blue2, borderColor: Color.theme1[colorScheme].greenD9 + "",
borderWidth: 1, borderWidth: 1,
}, },
]} ]}
@ -36,9 +85,9 @@ function MyBooks({ books, grades }) {
<Text <Text
style={[ style={[
{ {
color: Color.theme1.light.blue5, color: Color.theme1[colorScheme].green79,
fontFamily: "bold", fontFamily: "bold",
fontSize: fontSize.base, fontSize: fontSize.xl,
}, },
]} ]}
> >
@ -50,60 +99,16 @@ function MyBooks({ books, grades }) {
horizontal={true} horizontal={true}
inverted={true} inverted={true}
data={books} data={books}
renderItem={({ item }) => <Book book={item} grades={grades} />} renderItem={({ item }) => <Book book={item} />}
keyExtractor={(book) => book.name} keyExtractor={(book) => book?.id}
/> />
</View> </View>
</View> </View>
); );
} }
const Book = ({ book, grades }) => {
const navigation = useNavigation();
return (
<TouchableOpacity
style={tw("flex flex-col ml-3")}
onPress={() => navigation.navigate("Product")}
>
<Image
source={{uri : `https://dnvn.ir/api/v1/file/${book.product.book.fileIds}` }}
style={[
tw("rounded-md"),
{
height: 160,
width: 110,
},
]}
/>
<Text
style={[
tw("mt-2 pr-1"),
{
color: Color.theme1.light.blue6,
fontFamily: "bold",
fontSize: fontSize.sm,
},
]}
>
{book.product.book.name}
</Text>
<Text
style={[
tw("mt-1 pr-1"),
{
color: Color.theme1.light.blue5,
fontFamily: "light",
fontSize: fontSize.xs,
},
]}
>{'پایه' + ' ' + grades[book.product.book.gradeId]}</Text>
<Progress percent={60} alignItems={'items-end'} />
</TouchableOpacity>
);
};
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
grades : state.publicApi.grades grades: state.publicApi.grades,
}); });
export default connect(mapStateToProps)(MyBooks); export default connect(mapStateToProps)(MyBooks);

@ -1,20 +1,50 @@
import React from "react"; import React from "react";
import { import { View, Image, TouchableOpacity, FlatList } from "react-native";
View,
Image,
TouchableOpacity,
FlatList,
} from "react-native";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import Header from "../components/Header";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import { connect } from "react-redux"; import { connect } from "react-redux";
function Scroll({ books }) { function Scroll({ books }) {
const Box = ({ books }) => {
const Product = ({ book, position }) => {
const navigation = useNavigation();
return (
<TouchableOpacity
onPress={() => navigation.navigate("Product")}
style={[
tw("rounded-md mx-1 overflow-hidden rounded-md"),
{
width: position === 0 ? 163 : 79,
height: position === 0 ? 245 : 118,
},
]}
onPress={() =>
navigation.navigate("Product", { id: book.id, type: "book" })
}
>
<Image
source={{ uri: `https://dnvn.ir/api/v1/file/${book.fileIds}` }}
style={{ width: "100%", height: "100%" }}
/>
</TouchableOpacity>
);
};
return (
<View
style={[
tw("flex flex-col flex-wrap-reverse justify-between"),
{ height: 245, direction: "rtl" },
]}
>
{books.map((book, index) => (
<Product book={book} position={Number(index)} key={index} />
))}
</View>
);
};
return ( return (
<View style={[tw("flex flex-col px-3 mb-5")]}> <View style={[tw("flex flex-col pr-3 mb-5")]}>
<Header title={"فروشگاه"} route={"Products"} />
<FlatList <FlatList
showsHorizontalScrollIndicator={false} showsHorizontalScrollIndicator={false}
horizontal={true} horizontal={true}
@ -28,44 +58,7 @@ function Scroll({ books }) {
); );
} }
const Box = ({ books }) => {
return (
<View
style={[
tw("flex flex-col flex-wrap-reverse justify-between"),
{ height: 245, direction: "rtl" },
]}
>
{books.map((book, index) => (
<Product book={book} position={Number(index)} key={index} />
))}
</View>
);
};
const Product = ({ book, position }) => {
const navigation = useNavigation();
return (
<TouchableOpacity
onPress={() => navigation.navigate("Product")}
style={[
tw("rounded-md mx-1 overflow-hidden rounded-md"),
{
width: position === 0 ? 163 : 79,
height: position === 0 ? 245 : 118,
},
]}
onPress={() => navigation.navigate("Product", { id : book.id, type : 'book'})}
>
<Image
source={{ uri: `https://dnvn.ir/api/v1/file/${book.fileIds}` }}
style={{ width: "100%", height: "100%" }}
/>
</TouchableOpacity>
);
};
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
// features: state.publicApi.home?.features,
}); });
export default connect(mapStateToProps, {})(Scroll); export default connect(mapStateToProps, {})(Scroll);

@ -1,15 +1,62 @@
import { View, Text, Image, TouchableOpacity, FlatList } from "react-native"; import { View, Text, Image, TouchableOpacity, FlatList } from "react-native";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import fontSize from "../../../constants/fontSize";
import { connect } from "react-redux"; import { connect } from "react-redux";
//components
import Progress from "../../../components/Progress"; import Progress from "../../../components/Progress";
import Header from "../components/Header"; import Header from "../components/Header";
//Color //style
import Color from "../../../constants/Colors"; import Color from "../../../constants/Colors";
import fontSize from "../../../constants/fontSize";
function Videos({ videos, grades }) { function Videos({ videos, grades }) {
const Video = ({ video }) => {
const navigation = useNavigation();
return (
<TouchableOpacity
style={tw("flex flex-col ml-3")}
onPress={() => navigation.navigate("Video", { id: video.id })}
>
<Image
source={{ uri: `https://dnvn.ir/api/v1/file/${video.fileIds}` }}
style={[
tw("rounded-md"),
{
height: 160,
width: 110,
},
]}
/>
<Text
style={[
tw("mt-2 pr-1"),
{
color: Color.theme1.light.blue6,
fontFamily: "bold",
fontSize: fontSize.tiny,
},
]}
>
{video.name}
</Text>
<Text
style={[
tw("mt-1 pr-1"),
{
color: Color.theme1.light.blue5,
fontFamily: "light",
fontSize: fontSize.sm,
},
]}
>
{grades[video.gradeId]}
</Text>
<Progress percent={60} alignItems={"items-end"} />
</TouchableOpacity>
);
};
return ( return (
<View style={[tw("w-full px-2 mb-5")]}> <View style={[tw("w-full px-2 mb-5")]}>
<View <View
@ -24,7 +71,7 @@ function Videos({ videos, grades }) {
horizontal={true} horizontal={true}
inverted={true} inverted={true}
data={videos} data={videos}
renderItem={({ item }) => <Video video={item} grades={grades} />} renderItem={({ item }) => <Video video={item} />}
keyExtractor={(item) => item.id} keyExtractor={(item) => item.id}
/> />
</View> </View>
@ -32,52 +79,6 @@ function Videos({ videos, grades }) {
); );
} }
const Video = ({ video, grades }) => {
const navigation = useNavigation();
return (
<TouchableOpacity
style={tw("flex flex-col ml-3")}
onPress={() => navigation.navigate("Video", { id: video.id })}
>
<Image
source={{ uri: `https://dnvn.ir/api/v1/file/${video.fileIds}` }}
style={[
tw("rounded-md"),
{
height: 160,
width: 110,
},
]}
/>
<Text
style={[
tw("mt-2 pr-1"),
{
color: Color.theme1.light.blue6,
fontFamily: "bold",
fontSize: fontSize.sm,
},
]}
>
{video.name}
</Text>
<Text
style={[
tw("mt-1 pr-1"),
{
color: Color.theme1.light.blue5,
fontFamily: "light",
fontSize: fontSize.xs,
},
]}
>
{grades[video.gradeId]}
</Text>
<Progress percent={60} alignItems={"items-end"} />
</TouchableOpacity>
);
};
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
grades: state.publicApi.grades, grades: state.publicApi.grades,
}); });

@ -18,6 +18,7 @@ import MyBooks from "./components/MyBooks";
import Videos from "./components/Videos"; import Videos from "./components/Videos";
import Blogs from "./components/Blogs"; import Blogs from "./components/Blogs";
import Drawer from "../../components/Drawer"; import Drawer from "../../components/Drawer";
import Header from "./components/Header";
// import { SafeAreaView } from 'react-native-safe-area-context'; // import { SafeAreaView } from 'react-native-safe-area-context';
@ -70,6 +71,9 @@ const Home = ({
style={[styles.container, tw("w-full flex flex-col")]} style={[styles.container, tw("w-full flex flex-col")]}
> >
{userProducts.length > 0 && <MyBooks books={userProducts} />} {userProducts.length > 0 && <MyBooks books={userProducts} />}
<View style={tw("px-4 w-full")}>
<Header title={"فروشگاه"} route={"Products"} />
</View>
{books.length > 0 && <Scroll books={books} />} {books.length > 0 && <Scroll books={books} />}
{books.length > 0 && <Videos videos={books} />} {books.length > 0 && <Videos videos={books} />}
{blogs.length > 0 && <Blogs blogs={blogs} />} {blogs.length > 0 && <Blogs blogs={blogs} />}
@ -81,7 +85,7 @@ const Home = ({
// Later on in your styles.. // Later on in your styles..
const styles = StyleSheet.create({ const styles = StyleSheet.create({
contentContainerStyle: { contentContainerStyle: {
paddingBottom: 100, paddingBottom: 60,
}, },
container: { container: {
width: Dimensions.get("window").width, width: Dimensions.get("window").width,

@ -8,6 +8,7 @@ import {
ActivityIndicator, ActivityIndicator,
Dimensions, Dimensions,
TouchableHighlight, TouchableHighlight,
Appearance
} from "react-native"; } from "react-native";
import Logo from "./assets/logo.png"; import Logo from "./assets/logo.png";
import CustomTextInput from "../../components/CustomTextInput"; import CustomTextInput from "../../components/CustomTextInput";
@ -15,10 +16,13 @@ import onInput from '../../utils/onInput';
import { asyncAwesomeAlert } from "../../utils/AsyncWrappers"; import { asyncAwesomeAlert } from "../../utils/AsyncWrappers";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import {user} from '../../redux/actions'; import {user} from '../../redux/actions';
import Colors from "../../constants/Colors";
import fontSize from "../../constants/fontSize";
const { width } = Dimensions.get("window"); const { width } = Dimensions.get("window");
function Login(props) { function Login(props) {
const colorScheme = Appearance.getColorScheme();
const [phone, setPhone] = useState(""); const [phone, setPhone] = useState("");
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
@ -58,16 +62,28 @@ function Login(props) {
/> />
<Text <Text
style={[ style={[
tw("w-full my-5"), tw("w-full mt-5"),
{ {
fontSize: width / 20, fontSize: fontSize.xl2,
fontFamily: "bold", fontFamily: "bold",
color: "#132F52", color: Colors.theme1[colorScheme].black,
}, },
]} ]}
> >
{"سلام"} {"سلام"}
</Text> </Text>
<Text
style={[
tw("w-full mb-5"),
{
fontSize: fontSize.xl2,
fontFamily: "bold",
color: Colors.theme1[colorScheme].black,
},
]}
>
{"خوش برگشتی!"}
</Text>
<View style={[tw("w-full rounded-md overflow-hidden relative"), {}]}> <View style={[tw("w-full rounded-md overflow-hidden relative"), {}]}>
<CustomTextInput <CustomTextInput
label="شماره موبایل" label="شماره موبایل"
@ -83,9 +99,9 @@ function Login(props) {
<TouchableHighlight <TouchableHighlight
disabled={loading} disabled={loading}
style={[ style={[
tw("w-full py-2 rounded-md"), tw("w-full py-2.5 rounded-md"),
{ {
backgroundColor: "#196EC0", backgroundColor: Colors.theme1[colorScheme].greenCF,
alignItems: "center", alignItems: "center",
justifyContent: "center", justifyContent: "center",
marginTop: 15, marginTop: 15,
@ -100,7 +116,8 @@ function Login(props) {
<Text <Text
style={{ style={{
color: "white", color: "white",
fontSize: 18, fontSize: fontSize.xl,
fontWeight: "bold"
}} }}
> >
{"ادامه"} {"ادامه"}

@ -7,13 +7,17 @@ import {
Dimensions, Dimensions,
TouchableOpacity, TouchableOpacity,
ActivityIndicator, ActivityIndicator,
Appearance,
} from "react-native"; } from "react-native";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import { connect } from "react-redux"; import { connect } from "react-redux";
import Logo from "../Login/assets/logo.png"; import Logo from "../Login/assets/logo.png";
import { digitToEn } from "../../utils"; import { digitToEn } from "../../utils";
import onInput from "../../utils/onInput"; import onInput from "../../utils/onInput";
import {user} from '../../redux/actions'; import { user } from "../../redux/actions";
import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
const { width } = Dimensions.get("window"); const { width } = Dimensions.get("window");
let ref1; let ref1;
@ -24,6 +28,7 @@ let ref4;
let timer = 60; let timer = 60;
function Otp(props) { function Otp(props) {
const colorScheme = Appearance.getColorScheme();
const [firstCode, setFirstCode] = useState(""); const [firstCode, setFirstCode] = useState("");
const [secondCode, setSecondCode] = useState(""); const [secondCode, setSecondCode] = useState("");
const [thirdCode, setThirdCode] = useState(""); const [thirdCode, setThirdCode] = useState("");
@ -126,7 +131,7 @@ function Otp(props) {
style={[ style={[
tw("w-full mt-2.5"), tw("w-full mt-2.5"),
{ {
fontSize: width / 34, fontSize: fontSize.sm,
fontFamily: "regular", fontFamily: "regular",
color: "#6f7074", color: "#6f7074",
}, },
@ -139,55 +144,63 @@ function Otp(props) {
> >
<TextInput <TextInput
style={[ style={[
tw("bg-gray-200 py-3 px-5 text-center rounded-md mx-1"), tw("bg-gray-100 py-3 px-5 text-center rounded-md mx-1"),
{ fontSize: width / 18, fontFamily: "bold", color: "#196EC0" }, {
fontSize: fontSize.xl3,
fontFamily: "bold",
color: Colors.theme1[colorScheme].green79,
},
]} ]}
underlineColorAndroid={"transparent"} underlineColorAndroid={"transparent"}
value={firstCode} value={firstCode}
maxLength={1} maxLength={1}
ref={(ref) => (ref1 = ref)} ref={(ref) => (ref1 = ref)}
onChangeText={(text) => onChangeText={(text) => onChangeCode(text, "1")}
onChangeCode(text, "1")
}
/> />
<TextInput <TextInput
style={[ style={[
tw("bg-gray-200 py-3 px-5 text-center rounded-md mx-1"), tw("bg-gray-100 py-3 px-5 text-center rounded-md mx-1"),
{ fontSize: width / 18, fontFamily: "bold", color: "#196EC0" }, {
fontSize: fontSize.xl3,
fontFamily: "bold",
color: Colors.theme1[colorScheme].green79,
},
]} ]}
underlineColorAndroid={"transparent"} underlineColorAndroid={"transparent"}
value={secondCode} value={secondCode}
maxLength={1} maxLength={1}
ref={(ref) => (ref2 = ref)} ref={(ref) => (ref2 = ref)}
onChangeText={(text) => onChangeText={(text) => onChangeCode(text, "2")}
onChangeCode(text, "2")
}
/> />
<TextInput <TextInput
style={[ style={[
tw("bg-gray-200 py-3 px-5 text-center rounded-md mx-1"), tw("bg-gray-100 py-3 px-5 text-center rounded-md mx-1"),
{ fontSize: width / 18, fontFamily: "bold", color: "#196EC0" }, {
fontSize: fontSize.xl3,
fontFamily: "bold",
color: Colors.theme1[colorScheme].green79,
},
]} ]}
underlineColorAndroid={"transparent"} underlineColorAndroid={"transparent"}
value={thirdCode} value={thirdCode}
maxLength={1} maxLength={1}
ref={(ref) => (ref3 = ref)} ref={(ref) => (ref3 = ref)}
onChangeText={(text) => onChangeText={(text) => onChangeCode(text, "3")}
onChangeCode(text, "3")
}
/> />
<TextInput <TextInput
style={[ style={[
tw("bg-gray-200 py-3 px-5 text-center rounded-md mx-1"), tw("bg-gray-100 py-3 px-5 text-center rounded-md mx-1"),
{ fontSize: width / 18, fontFamily: "bold", color: "#196EC0" }, {
fontSize: fontSize.xl3,
fontFamily: "bold",
color: Colors.theme1[colorScheme].green79,
},
]} ]}
underlineColorAndroid={"transparent"} underlineColorAndroid={"transparent"}
value={fourthCode} value={fourthCode}
maxLength={1} maxLength={1}
ref={(ref) => (ref4 = ref)} ref={(ref) => (ref4 = ref)}
onChangeText={(text) => onChangeText={(text) => onChangeCode(text, "4")}
onChangeCode(text, "4")
}
/> />
</View> </View>
<TouchableOpacity <TouchableOpacity
@ -195,7 +208,7 @@ function Otp(props) {
style={[ style={[
tw("w-full rounded-md py-2 mt-6 items-center justify-center"), tw("w-full rounded-md py-2 mt-6 items-center justify-center"),
{ {
backgroundColor: "#196EC0", backgroundColor: Colors.theme1[colorScheme].greenCF,
}, },
]} ]}
onPress={() => submit()} onPress={() => submit()}
@ -206,8 +219,8 @@ function Otp(props) {
<Text <Text
style={{ style={{
color: "white", color: "white",
fontSize: width / 25, fontSize: fontSize.xl,
fontFamily: "regular", fontFamily: "bold",
}} }}
> >
{"ثبت"} {"ثبت"}
@ -218,7 +231,7 @@ function Otp(props) {
<Text <Text
style={[ style={[
tw("mt-7 text-center"), tw("mt-7 text-center"),
{ fontFamily: "light", fontSize: width / 36 }, { fontFamily: "light", fontSize: fontSize.base },
]} ]}
> >
{"زمان باقی مانده تا انقضای کد: " + time} {"زمان باقی مانده تا انقضای کد: " + time}
@ -233,8 +246,8 @@ function Otp(props) {
style={{ style={{
textAlign: "center", textAlign: "center",
fontFamily: "light", fontFamily: "light",
fontSize: width / 36, fontSize: fontSize.base,
color: "#196EC0", color: Colors.theme1[colorScheme].greenBA,
}} }}
> >
{"بازگشت به مرحله قبل و اصلاح شماره"} {"بازگشت به مرحله قبل و اصلاح شماره"}

@ -1,4 +1,4 @@
import React, { useState, useRef } from "react"; import React, { useState, useEffect } from "react";
import { import {
View, View,
Text, Text,
@ -6,51 +6,86 @@ import {
ScrollView, ScrollView,
TouchableOpacity, TouchableOpacity,
Dimensions, Dimensions,
StatusBar, Appearance,
Pressable
} from "react-native"; } from "react-native";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import { product, userProduct } from "../../../redux/actions";
import { connect } from "react-redux";
import { Entypo } from "@expo/vector-icons"; import { Entypo } from "@expo/vector-icons";
//components
import CustomPressable from "../../../components/Pressable"; import CustomPressable from "../../../components/Pressable";
import Description from "./Description"; import Description from "./Description";
import LinkBox from "./LinkBox"; import LinkBox from "./LinkBox";
import Comments from "./Comments"; import Comments from "./Comments";
import Rates from "./Rates";
import ProductSpecifications from "../../../components/BottomSheetComponents/ProductSpecifications"; import ProductSpecifications from "../../../components/BottomSheetComponents/ProductSpecifications";
import ProductReview from "../../../components/BottomSheetComponents/ProductReview"; import ProductReview from "../../../components/BottomSheetComponents/ProductReview";
import ProductQuestion from "../../../components/BottomSheetComponents/ProductQuestion"; import ProductQuestion from "../../../components/BottomSheetComponents/ProductQuestion";
import tw from "tailwind-react-native-classnames"; import Blur from "../../../components/Blur";
import ImageSlider from "../../../components/ImageSlider";
//style
import tw from "tailwind-rn";
import fontSize from "../../../constants/fontSize"; import fontSize from "../../../constants/fontSize";
import { product, userProduct } from "../../../redux/actions"; import Colors from "../../../constants/Colors";
import { connect } from "react-redux";
const { height } = Dimensions.get("window"); const { height } = Dimensions.get("window");
function Book({ book, grades, pushToCart, userId }) { function Book({ book, grades, pushToCart, userId, loading }) {
const colorScheme = Appearance.getColorScheme();
const navigation = useNavigation(); const navigation = useNavigation();
const [type, setType] = useState(1); const [type, setType] = useState(1);
const [pageLoading, setPageLoading] = useState(false);
const [imageSlider, setImageSlider] = useState(false);
useEffect(() => {
setPageLoading(true);
setTimeout(() => {
setPageLoading(false);
}, 500);
}, [type]);
return ( return (
<ScrollView style={[tw.style("flex flex-col flex-1")]}> <ScrollView style={[tw("flex flex-col flex-1 relative")]}>
<View style={tw.style("flex flex-row-reverse")}> {pageLoading && (
<View style={[tw.style("rounded-md"), { height: 160, width: 110 }]}> <Pressable
style={[
tw("absolute left-0 top-0 rounded-md overflow-hidden"),
{
width: Dimensions.get("window").width,
height: height - 150,
zIndex: 1,
backgroundColor: Colors.theme1[colorScheme].white + "60",
},
]}
>
<Blur />
</Pressable>
)}
{imageSlider && <ImageSlider />}
<View style={tw("flex flex-row-reverse")}>
<Pressable
style={[tw("rounded-md"), { height: 160, width: 110 }]}
// onPress={() => setImageSlider(true)}
>
<Image <Image
source={{ uri: `https://dnvn.ir/api/v1/file/${book.fileIds}` }} source={{ uri: `https://dnvn.ir/api/v1/file/${book.fileIds}` }}
style={[tw.style("rounded-md h-full w-full")]} style={[tw("rounded-md h-full w-full")]}
/> />
</View> </Pressable>
<View <View
style={[ style={[
tw.style("flex flex-col flex-1 justify-between items-end"), tw("flex flex-col flex-1 justify-between items-end"),
{ {
paddingRight: 10, paddingRight: 10,
}, },
]} ]}
> >
<View style={tw.style("flex flex-col items-end")}> <View style={tw("flex flex-col items-end")}>
<Text <Text
style={{ style={{
color: "#05335F", color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.xl2, fontSize: fontSize.xl,
marginBottom: 5, marginBottom: 5,
fontFamily: "bold", fontFamily: "bold",
}} }}
@ -59,9 +94,9 @@ function Book({ book, grades, pushToCart, userId }) {
</Text> </Text>
<Text <Text
style={{ style={{
color: "#196EC0", color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.base, fontSize: fontSize.lg,
fontFamily: "light", fontFamily: "regular",
}} }}
> >
{"پایه" + " " + grades[book.gradeId]} {"پایه" + " " + grades[book.gradeId]}
@ -69,7 +104,7 @@ function Book({ book, grades, pushToCart, userId }) {
</View> </View>
<Text <Text
style={[ style={[
tw.style("text-right w-full"), tw("text-right w-full"),
{ color: "#323232", fontSize: fontSize.sm, fontFamily: "light" }, { color: "#323232", fontSize: fontSize.sm, fontFamily: "light" },
]} ]}
> >
@ -78,16 +113,14 @@ function Book({ book, grades, pushToCart, userId }) {
</View> </View>
</View> </View>
<View <View
style={tw.style( style={tw("flex flex-row-reverse items-center justify-around py-6")}
"flex flex-row-reverse items-center justify-around py-6"
)}
> >
<View> <View>
<Text <Text
style={{ style={{
color: "#196EC0", color: Colors.theme1[colorScheme].greenCF,
textAlign: "center", textAlign: "center",
fontSize: fontSize.sm, fontSize: fontSize.tiny,
fontFamily: "regular", fontFamily: "regular",
}} }}
> >
@ -96,14 +129,18 @@ function Book({ book, grades, pushToCart, userId }) {
</Text> </Text>
</View> </View>
<View <View
style={{ backgroundColor: "#196EC055", height: 20, width: 2 }} style={{
backgroundColor: Colors.theme1[colorScheme].greenCF + "55",
height: 20,
width: 2,
}}
></View> ></View>
<View> <View>
<Text <Text
style={{ style={{
color: "#196EC0", color: Colors.theme1[colorScheme].greenCF,
textAlign: "center", textAlign: "center",
fontSize: fontSize.sm, fontSize: fontSize.tiny,
fontFamily: "regular", fontFamily: "regular",
}} }}
> >
@ -112,14 +149,18 @@ function Book({ book, grades, pushToCart, userId }) {
</Text> </Text>
</View> </View>
<View <View
style={{ backgroundColor: "#196EC055", height: 20, width: 2 }} style={{
backgroundColor: Colors.theme1[colorScheme].greenCF + "55",
height: 20,
width: 2,
}}
></View> ></View>
<View> <View>
<Text <Text
style={{ style={{
color: "#196EC0", color: Colors.theme1[colorScheme].greenCF,
textAlign: "center", textAlign: "center",
fontSize: fontSize.sm, fontSize: fontSize.tiny,
fontFamily: "regular", fontFamily: "regular",
}} }}
> >
@ -131,43 +172,46 @@ function Book({ book, grades, pushToCart, userId }) {
<View style={"flex flex-col mt-6"}> <View style={"flex flex-col mt-6"}>
<Text <Text
style={[ style={[
tw.style("w-full text-right"), tw("w-full text-right"),
{ {
color: "#196EC0", color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.base, fontSize: fontSize.tiny,
fontFamily: "regular", fontFamily: "bold",
}, },
]} ]}
> >
نسخه محصول را انتخاب کنید نسخه محصول را انتخاب کنید
</Text> </Text>
<View style={tw.style("flex justify-between")}></View> <View style={tw("flex justify-between")}></View>
</View> </View>
<View <View style={tw("flex flex-row-reverse justify-between flex-wrap py-3")}>
style={tw.style("flex flex-row-reverse justify-between flex-wrap py-3")}
>
<CustomPressable <CustomPressable
title={"نسخه فیزیکی"} title={"نسخه فیزیکی"}
onPress={() => setType(1)} onPress={() => setType(1)}
backgroundColor={type === 0 ? "transparent" : "#196EC0"} backgroundColor={
color={type === 0 ? "#196EC0" : "white"} type === 0 ? "transparent" : Colors.theme1[colorScheme].greenCF
border={{ color: "#196EC0", width: 1 }} }
color={type === 0 ? Colors.theme1[colorScheme].greenCF : "white"}
border={{ color: Colors.theme1[colorScheme].greenCF, width: 1 }}
width={"49%"} width={"49%"}
/> />
<CustomPressable <CustomPressable
onPress={() => setType(0)} onPress={() => setType(0)}
title={"نسخه دیجیتال"} title={"نسخه دیجیتال"}
backgroundColor={type === 1 ? "transparent" : "#196EC0"} backgroundColor={
color={type === 1 ? "#196EC0" : "white"} type === 1 ? "transparent" : Colors.theme1[colorScheme].greenCF
border={{ color: "#196EC0", width: 1 }} }
color={type === 1 ? Colors.theme1[colorScheme].greenCF : "white"}
border={{ color: Colors.theme1[colorScheme].greenCF, width: 1 }}
width={"49%"} width={"49%"}
/> />
<CustomPressable <CustomPressable
title={`خرید با قیمت ${book.product[type].price} تومان`} title={`خرید با قیمت ${book.product[type].price} تومان`}
backgroundColor="#196EC0" backgroundColor={Colors.theme1[colorScheme].greenCF}
color={"white"} color={"white"}
border={{ color: "#196EC0", width: 0 }} border={{ color: "#196EC0", width: 0 }}
width={"65%"} width={"65%"}
loading={loading}
onPress={() => onPress={() =>
pushToCart({ pushToCart({
productId: book?.product[type]?.id, productId: book?.product[type]?.id,
@ -179,28 +223,36 @@ function Book({ book, grades, pushToCart, userId }) {
<CustomPressable <CustomPressable
title={"مشاهده نمونه"} title={"مشاهده نمونه"}
backgroundColor="transparent" backgroundColor="transparent"
color={"#196EC0"} color={Colors.theme1[colorScheme].redFF1}
border={{ color: "#196EC0", width: 1 }} border={{ color: Colors.theme1[colorScheme].redFF1, width: 1 }}
width={"33%"} width={"33%"}
onPress={() => {}} onPress={() => {}}
/> />
<TouchableOpacity <TouchableOpacity
style={[ style={[
tw.style( tw(
"w-full rounded-md flex flex-row justify-center items-center py-3 mt-4" "w-full rounded-md flex flex-row justify-center items-center py-3 mt-4"
), ),
{ backgroundColor: "#196EC01a" }, {
backgroundColor: Colors.theme1[colorScheme].greenCF + "1a",
borderWidth: 1,
borderColor: Colors.theme1[colorScheme].green79 + "33",
},
]} ]}
onPress={() => navigation.navigate("Video", { id: book.id })} onPress={() => navigation.navigate("Video", { id: book.id })}
> >
<Entypo name="chevron-small-left" size={20} color="#196EC0" /> <Entypo
name="chevron-small-left"
size={20}
color={Colors.theme1[colorScheme].green79}
/>
<Text <Text
style={[ style={[
tw.style(""), tw(""),
{ {
color: "#275077", color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.base, fontSize: fontSize.base,
fontFamily: "light", fontFamily: "bold",
}, },
]} ]}
> >
@ -231,9 +283,7 @@ function Book({ book, grades, pushToCart, userId }) {
/> />
{product.rates && ( {product.rates && (
<View <View
style={tw.style( style={tw("flex flex-row-reverse justify-between items-center my-6")}
"flex flex-row-reverse justify-between items-center my-6"
)}
> >
<Text <Text
style={[ style={[
@ -242,7 +292,7 @@ function Book({ book, grades, pushToCart, userId }) {
color: "#275077", color: "#275077",
fontFamily: "regular", fontFamily: "regular",
}, },
tw.style(""), tw(""),
]} ]}
> >
امتیازات و نظرات امتیازات و نظرات
@ -259,6 +309,7 @@ function Book({ book, grades, pushToCart, userId }) {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
userId: state.user.status.id, userId: state.user.status.id,
loading: state.userProduct.loading,
}); });
const mapDispatchToProps = { const mapDispatchToProps = {

@ -1,11 +1,15 @@
import React, { useRef } from "react"; import React, { useRef } from "react";
import { Text, TouchableOpacity, Dimensions, ScrollView } from "react-native"; import { Text, TouchableOpacity, Appearance } from "react-native";
import RBSheet from "react-native-raw-bottom-sheet"; import RBSheet from "react-native-raw-bottom-sheet";
import { Entypo } from "@expo/vector-icons";
//style
import tw from "tailwind-react-native-classnames"; import tw from "tailwind-react-native-classnames";
import fontSize from "../../../constants/fontSize"; import fontSize from "../../../constants/fontSize";
import { Entypo } from "@expo/vector-icons"; import Colors from "../../../constants/Colors";
export default function Description({ title, component, height }) { export default function Description({ title, component, height }) {
const colorScheme = Appearance.getColorScheme();
const refRBSheet = useRef(); const refRBSheet = useRef();
return ( return (
<> <>
@ -16,23 +20,24 @@ export default function Description({ title, component, height }) {
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-5 py-3" "flex flex-row-reverse justify-between items-center mt-3 rounded-md px-5 py-3"
), ),
{ {
backgroundColor: "#50A9FF33", backgroundColor: Colors.theme1[colorScheme].greenCF,
// borderWidth : 1,
}, },
]} ]}
> >
<Text <Text
style={[ style={[
{ {
fontSize: fontSize.base, fontSize: fontSize.tiny,
color: "#275077", color: "white",
fontFamily: "regular", fontFamily: "bold",
}, },
tw.style(""), tw.style(""),
]} ]}
> >
{title} {title}
</Text> </Text>
<Entypo name="chevron-small-left" size={20} color="#196EC0" /> <Entypo name="chevron-small-left" size={20} color="white" />
</TouchableOpacity> </TouchableOpacity>
<RBSheet <RBSheet
ref={refRBSheet} ref={refRBSheet}

@ -1,4 +1,4 @@
import React, { useState, useEffect } from "react"; import React, { useEffect } from "react";
import { import {
View, View,
StyleSheet, StyleSheet,
@ -6,30 +6,23 @@ import {
ScrollView, ScrollView,
SafeAreaView, SafeAreaView,
StatusBar, StatusBar,
LayoutAnimation,
} from "react-native"; } from "react-native";
import Book from "./components/Book"; import Book from "./components/Book";
import Video from "./components/Video"; import Video from "./components/Video";
import { connect } from "react-redux";
import {book} from "../../redux/actions"; import {book} from "../../redux/actions";
import { connect } from "react-redux";
import Navbar from "../../components/Navbar"; import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer";
function Product({ function Product({
route, route,
book, book,
getBook, getBook,
grades, grades,
}) { }) {
const [position, setPosition] = useState("100%");
useEffect(() => { useEffect(() => {
getBook({id : route.params.id}); getBook({id : route.params.id});
},[]); },[]);
const setBoxPosition = () => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
setPosition(position === "100%" ? "0%" : "100%");
};
return ( return (
<SafeAreaView <SafeAreaView
style={{ style={{
@ -49,7 +42,6 @@ function Product({
back: true, back: true,
}} }}
/> />
<Drawer setBoxPosition={setBoxPosition} position={position} />
<ScrollView <ScrollView
contentContainerStyle={styles.contentContainerStyle} contentContainerStyle={styles.contentContainerStyle}
style={styles.container} style={styles.container}

@ -1,56 +0,0 @@
import React from "react";
import { Image, Text, Dimensions, Pressable } from "react-native";
import { useNavigation } from "@react-navigation/native";
import tw from "tailwind-react-native-classnames";
import fontSize from '../../../constants/fontSize';
const width = Dimensions.get("window").width;
function Book({book, grades, type}) {
const navigation = useNavigation();
return (
<Pressable
style={[
{
width: width / 2 - 25,
// shadowColor : "#000",
// shadowOffset : {width : 0, height : 2},
// shadowRadius : 20,
// shadowOpacity : 1,
marginBottom: 15,
borderWidth: 1,
borderColor: "#ddd",
},
tw.style("flex flex-col items-end px-2 pt-2 rounded-md"),
]}
onPress={() => navigation.navigate("Product", { id : book.id, type : 'book'})}
>
<Image
source={{ uri: `https://dnvn.ir/api/v1/file/${book.fileIds}` }}
style={[tw.style("w-full rounded-md"), { height: (width / 2 - 25) * 16 / 14 }]}
/>
<Text
style={{
fontSize: fontSize.lg,
marginTop: 5,
color: "#05335F",
fontFamily: "bold",
}}
>
{ (type === 1 ? 'کتاب فیزیکی' : 'کتاب دیجیتال') + ' ' + book.name}
</Text>
<Text style={{ color: "#196EC0", fontSize: fontSize.sm, marginTop: 5, fontFamily : 'light' }}>
{'پایه' + ' ' + grades[book.gradeId]}
</Text>
<Text
style={[
tw.style("w-full text-center mb-1"),
{ marginTop: 10, color: "#132F52", fontFamily : 'bold', fontSize: fontSize.base },
]}
>
{( type=== 1 ? book.product[1].price : book.product[0].price ) + ' ' + 'تومان'}
</Text>
</Pressable>
);
}
export default Book;

@ -0,0 +1,57 @@
import { View, Text } from "react-native";
import React from "react";
import _ from "lodash";
import { connect } from "react-redux";
import { book } from "../../../redux/actions";
//style
import tw from "tailwind-rn";
//components
import Search from "../../../components/Search";
import Select from "../../../components/Select";
const Header = ({ setFilterOptions, filterOptions, levels, productTypes }) => {
return (
<View style={tw("flex flex-col px-4 h-28 bg-white")}>
<Search
onChange={(val) => setFilterOptions({ ...filterOptions, search: val })}
placeholder={"نام کتاب یا دوره را جستجو کنید"}
/>
<View
style={[tw("flex flex-1 flex-row justify-between items-center my-2")]}
>
<Select
defaultValue={productTypes[0]}
onChange={(name, value) =>
setFilterOptions({ ...filterOptions, [name]: value })
}
options={productTypes}
width={"48%"}
name="productType"
/>
<Select
defaultValue={Object.values(levels)[0]}
onChange={(name, value) =>
setFilterOptions({ ...filterOptions, [name]: value })
}
options={Object.values(levels)}
width={"48%"}
name="grade"
/>
</View>
</View>
);
};
const mapStateToProps = (state) => ({
levels: state.publicApi.grades,
productTypes: state.book.productTypes,
filterOptions: state.book.filterOptions,
});
const mapDispatchToProps = {
setFilterOptions: book.setFilterOptions,
};
export default connect(mapStateToProps, mapDispatchToProps)(Header);

@ -0,0 +1,297 @@
import {
View,
Text,
Pressable,
Image,
Dimensions,
Appearance,
} from "react-native";
import React from "react";
import { connect } from "react-redux";
import separate from "../../../utils/separate";
import { useNavigation } from "@react-navigation/native";
//style
import tw from "tailwind-rn";
import Colors from "../../../constants/Colors";
import fontSize from "../../../constants/fontSize";
const width = Dimensions.get("window").width;
const Main = ({ books, filterOptions, grades }) => {
const colorScheme = Appearance.getColorScheme();
const navigation = useNavigation();
const [filterLoading, setFilterLoading] = React.useState(false);
React.useEffect(() => {
setFilterLoading(() => true);
setTimeout(() => {
setFilterLoading(() => false);
}, 500);
}, [filterOptions]);
const Items = (type) => {
const { grade, subject, available, sort, productType, search } =
filterOptions;
let byGradeFilter;
let bySubjectFilter;
let byAvailableFilter;
let bySearchFilter;
if (grade && grade !== "همه پایه ها") {
byGradeFilter = books?.filter((book) => grades[book?.gradeId] === grade);
} else {
byGradeFilter = books;
}
if (subject) {
bySubjectFilter = byGradeFilter?.filter(
(book) =>
book?.product[type]?.name?.indexOf(subject) !== -1 ||
book?.name.indexOf(subject) !== -1
);
} else {
bySubjectFilter = byGradeFilter;
}
if (available) {
byAvailableFilter = bySubjectFilter?.filter(
(book) => book.product[type].price
);
} else {
byAvailableFilter = bySubjectFilter;
}
if (search) {
bySearchFilter = byAvailableFilter?.filter(
(book) =>
book?.product[type]?.name?.indexOf(search) !== -1 ||
book?.name.indexOf(search) !== -1
);
} else {
bySearchFilter = byAvailableFilter;
}
return filterOptions.productType === "دوره ویدئویی"
? bySearchFilter?.map((product, index) => (
<Pressable
style={[tw(`w-full flex flex-col mb-5`)]}
key={Math.random()}
onPress={() => navigation.navigate("Product")}
>
<View style={[tw("relative w-full mb-1")]}>
<Image
source={{
uri: `https://dnvn.ir/api/v1/file/${product?.fileIds}`,
}}
style={[
tw("w-full rounded-md"),
{ height: ((width - 25) * 9) / 16 },
]}
/>
</View>
<Text
style={[
tw("mb-1"),
{ fontFamily: "bold", fontSize: fontSize.xl2, color : Colors.theme1[colorScheme].gray20 },
]}
>
{'دوره ویدئویی' + ' ' + product?.name}
</Text>
<Text style={[tw("mb-4"), { fontSize: fontSize.tiny, fontFamily : 'regular', color : Colors.theme1[colorScheme].greenBA }]}>
{"پایه" + " " + grades[product?.gradeId]}
</Text>
<Text style={[tw("w-full flex flex-row text-left"), {fontSize : fontSize.xl, fontFamily : 'bold'}]}>
{separate(product?.product[2]?.price) + " " + "تومان"}
</Text>
</Pressable>
))
: bySearchFilter?.map((product, index) => (
<>
{(productType
? productType === ("کتاب دیجیتال" || "همه محصولات")
: true) && (
<Pressable
key={product?.product[0]?.id}
style={[
{
width: width / 2 - 25,
marginBottom: 15,
borderWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
},
tw("flex justify-between px-2 pt-2 rounded-md"),
]}
onPress={() =>
navigation.navigate("Product", { id: product?.id, type: "book" })
}
>
<View style={tw("w-full flex")}>
<Image
source={{
uri: `https://dnvn.ir/api/v1/file/${product?.fileIds}`,
}}
style={[
tw("w-full rounded-md"),
{ height: ((width / 2 - 25) * 16) / 14 },
]}
/>
<Text
style={{
fontSize: fontSize.lg,
marginTop: 5,
color: "#05335F",
fontFamily: "bold",
width: "100%",
}}
>
{"کتاب دیجیتال" + " " + product?.name}
</Text>
<Text
style={{
color: Colors.theme1[colorScheme].greenBA,
fontSize: fontSize.tiny,
marginTop: 5,
fontFamily: "regular",
width: "100%",
}}
>
{"پایه" + " " + grades[product?.gradeId]}
</Text>
</View>
<View
style={tw(
"flex flex-row-reverse items-center justify-center pb-1 pt-2"
)}
>
<Text
style={[
tw("text-center ml-1"),
{
color: Colors.theme1[colorScheme].gray20,
fontFamily: "bold",
fontSize: fontSize.xl2,
},
]}
>
{separate(product?.product[0].price)}
</Text>
<Text
style={{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].grayCC,
fontFamily: "regular",
}}
>
تومان
</Text>
</View>
</Pressable>
)}
{(productType
? productType === ("کتاب فیزیکی" || "همه محصولات")
: true) && (
<Pressable
key={product?.product[1]?.id}
style={[
{
width: width / 2 - 25,
marginBottom: 15,
borderWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
},
tw("flex justify-between px-2 pt-2 rounded-md"),
]}
onPress={() =>
navigation.navigate("Product", { id: product?.id, type: "book" })
}
>
<View style={tw("w-full flex")}>
<Image
source={{
uri: `https://dnvn.ir/api/v1/file/${product?.fileIds}`,
}}
style={[
tw("w-full rounded-md"),
{ height: ((width / 2 - 25) * 16) / 14 },
]}
/>
<Text
style={{
fontSize: fontSize.lg,
marginTop: 5,
color: "#05335F",
fontFamily: "bold",
width: "100%",
}}
>
{"کتاب فیزیکی" + " " + product?.name}
</Text>
<Text
style={{
color: Colors.theme1[colorScheme].greenBA,
fontSize: fontSize.tiny,
marginTop: 5,
fontFamily: "regular",
width: "100%",
}}
>
{"پایه" + " " + grades[product?.gradeId]}
</Text>
</View>
<View
style={tw(
"flex flex-row-reverse items-center justify-center pb-1 pt-2"
)}
>
<Text
style={[
tw("text-center ml-1"),
{
color: Colors.theme1[colorScheme].gray20,
fontFamily: "bold",
fontSize: fontSize.xl2,
},
]}
>
{separate(product?.product[1].price)}
</Text>
<Text
style={{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].grayCC,
fontFamily: "regular",
}}
>
تومان
</Text>
</View>
</Pressable>
)}
</>
));
};
return (
<View
style={[tw(
"flex w-full px-4 flex-row flex-wrap justify-between bg-white pb-20"
)]}
>
{filterOptions?.productType === "دوره ویدئویی" && Items(2)}
{filterOptions?.productType === "کتاب دیجیتال" && Items(0)}
{filterOptions?.productType === "کتاب فیزیکی" && Items(1)}
{!filterOptions?.productType && Items(0)}
{/* {filterLoading && (
<View style="w-full h-screen flex justify-center items-center bg-white bg-opacity-20 backdrop-filter backdrop-blur-xl fixed left-0 top-0">
<Loading size={4} color="bg-green-400" />
</View>
)} */}
</View>
);
};
const mapStateToProps = (state) => ({
filterOptions: state.book.filterOptions,
});
const mapDispatchToProps = {};
export default connect(mapStateToProps, mapDispatchToProps)(Main);

@ -1,100 +0,0 @@
import React from "react";
import { View, Image, Text, Dimensions, Pressable } from "react-native";
import { useNavigation } from "@react-navigation/native";
import tw from "tailwind-react-native-classnames";
import fontSize from '../../../constants/fontSize';
import posterImage from "../assets/poster.png";
const width = Dimensions.get("window").width;
const height = Dimensions.get("window").height;
function Video({
item = {
name: "ریاضی",
price: "145.000 تومان",
grade: "4",
imageUrl: "https://dnvn.ir/api/v1/file/2105",
poster: posterImage,
},
}) {
const navigation = useNavigation();
return (
<Pressable
style={[
{
marginBottom: 15,
borderWidth: 1,
borderColor: "#ddd",
},
tw.style("w-full flex flex-col items-end p-2 rounded-md"),
]}
onPress={() => navigation.navigate("Product")}
>
<View
style={[
tw.style(
"w-full flex flex-row flex-1 justify-between items-center relative overflow-hidden"
),
{ height: height / 3.8 },
]}
>
{/* <View
style={[
tw.style('rounded-full bg-black bg-opacity-20 z-50'),
{width: 50, height: 50},
]}></View> */}
<Image
source={item.poster}
style={tw.style("w-full h-full absolute left-0 top-0")}
/>
<Image
source={{ uri: item.imageUrl }}
style={[
tw.style("rounded-md h-full absolute left-2 bottom-2 rounded-md"),
{ width: 70, height: 100 },
]}
/>
</View>
<Text
style={{
fontSize: fontSize.lg,
marginTop: 5,
color: "#05335F",
fontFamily: "bold",
}}
>
{item.name}
</Text>
<View
style={tw.style("w-full flex flex-row justify-between items-center")}
>
<Text
style={[
tw.style(""),
{
marginTop: 10,
color: "#132F52",
fontFamily: "bold",
fontSize: fontSize.base,
},
]}
>
{item.price}
</Text>
<Text
style={{
color: "#196EC0",
fontFamily: "light",
fontSize: fontSize.sm,
marginTop: 5,
}}
>
{"پایه" + " " + item.grade}
</Text>
</View>
</Pressable>
);
}
export default Video;

@ -3,82 +3,44 @@ import React, { useState, useEffect } from "react";
import { import {
View, View,
ScrollView, ScrollView,
StyleSheet,
Dimensions,
SafeAreaView, SafeAreaView,
StatusBar, StatusBar,
LayoutAnimation, LayoutAnimation,
} from "react-native"; } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { book } from "../../redux/actions"; import { book } from "../../redux/actions";
import tw from "tailwind-rn";
import Book from "./components/Book"; //components
import Search from "../../components/Search";
import Select from "../../components/Select";
import Drawer from "../../components/Drawer"; import Drawer from "../../components/Drawer";
import Header from "./components/Header";
import Main from "./components/Main";
//style
function Products({ grades, productTypes, books }) { function Products({ books, getBooks, grades }) {
const [position, setPosition] = useState("100%"); const [position, setPosition] = useState("100%");
const [productType, setProductType] = useState("کتاب فیزیکی");
const [grade, setGrade] = useState("");
const [search, setSearch] = useState("");
useEffect(() => {}, []); useEffect(() => {
getBooks({ vod: true });
}, []);
const setBoxPosition = () => { const setBoxPosition = () => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut); LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
setPosition(position === "100%" ? "0%" : "100%"); setPosition(position === "100%" ? "0%" : "100%");
}; };
const onChange = (name, value) => {};
return ( return (
<SafeAreaView <SafeAreaView
style={{ style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0, paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative", position: "relative",
// backgroundColor: "white",
}} }}
> >
<Drawer setBoxPosition={setBoxPosition} position={position} /> <Drawer setBoxPosition={setBoxPosition} position={position} />
<View style={tw("flex flex-col px-4 h-28 bg-white")}> <Header />
<Search
value={search}
onChange={setSearch}
placeholder={"نام کتاب یا دوره را جستجو کنید"}
/>
<View
style={[
tw("flex flex-1 flex-row justify-between items-center my-2"),
]}
>
<Select
defaultValue={"کتاب فیزیکی"}
value={productType}
onChange={setProductType}
options={productTypes}
width={"48%"}
/>
<Select
defaultValue={"همه پایه"}
value={grade}
onChange={setGrade}
options={Object.values(grades)}
width={"48%"}
/>
</View>
</View>
<ScrollView contentContainerStyle={{ paddingBottom: 100 }}> <ScrollView contentContainerStyle={{ paddingBottom: 100 }}>
<View <Main books={books} grades={grades} />
style={tw(
"flex w-full px-4 flex-row flex-wrap justify-between bg-white"
)}
>
{productType === "کتاب فیزیکی" &&
books.map((book, index) => (
<Book book={book} key={index} grades={grades} type={1} />
))}
{productType === "کتاب دیجیتال" &&
books.map((book, index) => (
<Book book={book} key={index} grades={grades} type={0} />
))}
</View>
</ScrollView> </ScrollView>
</SafeAreaView> </SafeAreaView>
); );
@ -91,6 +53,7 @@ const mapStateToProps = (state) => ({
const mapDispatchToProps = { const mapDispatchToProps = {
getBooks: book.list, getBooks: book.list,
setFilterOptions: book.setFilterOptions,
}; };
export default connect(mapStateToProps, mapDispatchToProps)(Products); export default connect(mapStateToProps, mapDispatchToProps)(Products);

@ -6,14 +6,18 @@ import {
TextInput, TextInput,
Dimensions, Dimensions,
KeyboardAvoidingView, KeyboardAvoidingView,
Appearance
} from "react-native"; } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { userFactor } from "../../../redux/actions"; import { userFactor } from "../../../redux/actions";
import tw from "tailwind-react-native-classnames";
const width = Dimensions.get("window").width; //style
import fontSize from '../../../constants/fontSize';
import Colors from '../../../constants/Colors';
import tw from "tailwind-rn";
function Code({ codeId, setCodeId, userId, factorId }) { function Code({ codeId, setCodeId, userId, factorId }) {
const colorScheme = Appearance.getColorScheme();
const [value, setValue] = React.useState(codeId || ""); const [value, setValue] = React.useState(codeId || "");
const setOff = () => { const setOff = () => {
@ -23,28 +27,28 @@ function Code({ codeId, setCodeId, userId, factorId }) {
return ( return (
<KeyboardAvoidingView <KeyboardAvoidingView
enabled enabled
style={tw.style("flex w-full flex-col items-end mt-5 overflow-hidden")} style={tw("flex w-full flex-col items-end mt-5 overflow-hidden")}
> >
<View <View
style={tw.style( style={[tw(
"flex w-full flex-row-reverse border border-blue-300 rounded-md mt-3" "flex w-full flex-row-reverse rounded-md mt-3"
)} ), {borderWidth : 1, borderColor : Colors.theme1[colorScheme].greenCF }]}
> >
<TextInput <TextInput
onChaneText={(text) => setValue(text)} onChaneText={(text) => setValue(text)}
style={[ style={[
tw.style("border-0 flex-1 text-right pr-4"), tw("border-0 flex-1 text-right pr-4"),
{ fontSize: width / 36, fontFamily: "light" }, { fontSize: fontSize.lg, fontFamily: "regular" },
]} ]}
placeholder={"کد تخفیف دارید ؟"} placeholder={"کد تخفیف دارید ؟"}
placeholderTextColor="#707070" placeholderTextColor={Colors.theme1[colorScheme].gray20}
/> />
<Pressable <Pressable
onClick={() => setOff()} onClick={() => setOff()}
style={[ style={[
tw.style("py-2 px-5"), tw("py-3 px-5"),
{ {
backgroundColor: "#196EC0", backgroundColor: Colors.theme1[colorScheme].greenCF,
borderTopLeftRadius: 5, borderTopLeftRadius: 5,
borderBottomLeftRadius: 5, borderBottomLeftRadius: 5,
}, },
@ -52,8 +56,8 @@ function Code({ codeId, setCodeId, userId, factorId }) {
> >
<Text <Text
style={[ style={[
tw.style("text-white"), tw("text-white"),
{ fontSize: width / 31, fontFamily: "regular" }, { fontSize: fontSize.lg, fontFamily: "bold" },
]} ]}
> >
ثبت کد ثبت کد

@ -1,32 +1,53 @@
import React from "react"; import React from "react";
import { View, Text, Image, Dimensions, Pressable } from "react-native"; import {
View,
Text,
Image,
Dimensions,
Pressable,
Appearance,
ActivityIndicator,
} from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { userProduct } from "../../../redux/actions"; import { userProduct } from "../../../redux/actions";
import separate from '../../../utils/separate';
import { AntDesign } from "@expo/vector-icons"; import { AntDesign } from "@expo/vector-icons";
import tw from "tailwind-react-native-classnames";
//style
import Colors from "../../../constants/Colors";
import fontSize from "../../../constants/fontSize";
import tw from "tailwind-rn";
const width = Dimensions.get("window").width; const width = Dimensions.get("window").width;
function Product({ product, grades, pushToCart }) { function Product({ product, grades, pushToCart, loading }) {
const colorScheme = Appearance.getColorScheme();
return ( return (
<View <View
style={[ style={[
tw.style("flex flex-row-reverse justify-between py-2"), tw("flex flex-row-reverse justify-between py-2"),
{ borderBottomWidth: 1, borderColor: "#7070701a", direction: "rtl" }, {
borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
direction: "rtl",
},
]} ]}
> >
<View style={tw.style("flex flex-row-reverse")}> <View style={tw("flex flex-row-reverse")}>
<Image <Image
source={{ source={{
uri: "https://dnvn.ir/api/v1/file/" + product.product.book.fileIds, uri: "https://dnvn.ir/api/v1/file/" + product.product.book.fileIds,
}} }}
style={[tw.style("rounded-md"), { width: 60, height: 90 }]} style={[
tw(""),
{ width: width / 5, height: ((width / 5) * 4) / 2.8 },
]}
/> />
<View style={tw.style("flex flex-col items-end pr-2")}> <View style={tw("flex flex-col items-end pr-2")}>
<Text <Text
style={{ style={{
fontSize: width / 31, fontSize: fontSize.lg,
color: "#05335F", color: Colors.theme1[colorScheme].green79,
marginBottom: 5, marginBottom: 5,
fontFamily: "bold", fontFamily: "bold",
}} }}
@ -35,30 +56,38 @@ function Product({ product, grades, pushToCart }) {
</Text> </Text>
<Text <Text
style={{ style={{
fontSize: width / 36, fontSize: fontSize.tiny,
color: "#707070", color: Colors.theme1[colorScheme].gray2077,
marginBottom: 5, marginBottom: 3,
fontFamily: "light", fontFamily: "regular",
}} }}
> >
{"پایه" + " " + grades[product.product.book.gradeId]} {"پایه" + " " + grades[product.product.book.gradeId]}
</Text> </Text>
<Text <Text
style={{ style={{
fontSize: width / 36, fontSize: fontSize.tiny,
color: "#707070", color: Colors.theme1[colorScheme].gray2077,
fontFamily: "light", fontFamily: "regular",
}} }}
> >
{product.productType === 2 ? "نسخه فیزیکی" : "نسخه دیجیتال"} {product.productType === 2 ? "نسخه فیزیکی" : "نسخه دیجیتال"}
</Text> </Text>
<View style={tw("flex flex-row items-center justify-center mt-4")}>
<Text style={[{ fontSize: fontSize.xs, fontFamily: "regular" }]}>
{" " + "تومان"}
</Text>
<Text style={[{ fontSize: fontSize.lg, fontFamily: "regular" }]}>
{separate(product?.product?.price)}
</Text>
</View>
</View> </View>
</View> </View>
<View style={tw.style("flex flex-col justify-between items-start")}> <View style={tw("flex flex-col justify-between items-start")}>
<AntDesign <AntDesign
name="close" name="close"
size={20} size={20}
color="black" color={Colors.theme1[colorScheme].redFF1}
onPress={() => onPress={() =>
pushToCart( pushToCart(
{ {
@ -71,8 +100,8 @@ function Product({ product, grades, pushToCart }) {
) )
} }
/> />
<View style={tw.style("flex flex-col items-center mt-2")}> <View style={tw("flex flex-col items-center mt-2")}>
<View style={tw.style("flex flex-row-reverse items-center mb-3")}> <View style={tw("flex flex-row-reverse items-center mb-3")}>
<Pressable <Pressable
onPress={() => onPress={() =>
pushToCart({ pushToCart({
@ -82,36 +111,45 @@ function Product({ product, grades, pushToCart }) {
}) })
} }
style={[ style={[
tw.style( tw(
"rounded-md py-0 px-2 flex flex-row justify-center items-center border" "rounded-md py-0 px-2 flex flex-row justify-center items-center border"
), ),
{ {
borderColor: "#196EC0", borderColor: Colors.theme1[colorScheme].greenCF,
}, },
]} ]}
> >
<Text <Text
style={{ style={{
fontSize: width / 25, fontSize: fontSize.xl,
color: "#196EC0", color: Colors.theme1[colorScheme].greenCF,
fontFamily: "light", fontFamily: "light",
}} }}
> >
+ +
</Text> </Text>
</Pressable> </Pressable>
<Text {loading ? (
style={[ <ActivityIndicator
tw.style("mx-2.5"), style={tw("mx-2")}
{ size="small"
fontSize: width / 19, color={Colors.theme1[colorScheme].greenBA}
color: "#196EC0", />
fontFamily: "regular", ) : (
}, <Text
]} style={[
> tw("mx-2.5"),
{product.count} {
</Text> fontSize: fontSize.xl6,
color: Colors.theme1[colorScheme].greenBA,
fontFamily: "bold",
},
]}
>
{product?.count}
</Text>
)}
<Pressable <Pressable
onPress={() => onPress={() =>
pushToCart({ pushToCart({
@ -121,30 +159,33 @@ function Product({ product, grades, pushToCart }) {
}) })
} }
style={[ style={[
tw.style( tw(
"rounded-md py-0 px-2.5 flex flex-row justify-center items-center border" "rounded-md py-0 px-2.5 flex flex-row justify-center items-center border"
), ),
{ {
borderColor: "#DBDBDB", borderColor: Colors.theme1[colorScheme].greenCF,
}, },
]} ]}
> >
<Text <Text
style={{ style={{
fontSize: width / 24, fontSize: fontSize.xl,
color: "#DBDBDB", color: Colors.theme1[colorScheme].greenCF,
fontFamily: "light", fontFamily: "bold",
}} }}
> >
- -
</Text> </Text>
</Pressable> </Pressable>
</View> </View>
<Text <View style={tw("flex flex-row items-center justify-center")}>
style={[tw.style("", { fontSize: width / 25, fontFamily: "bold" })]} <Text style={[{ fontSize: fontSize.sm, fontFamily: "regular" }]}>
> {" " + "تومان"}
{product.product.price + ' ' + 'تومان'} </Text>
</Text> <Text style={[{ fontSize: fontSize.xl, fontFamily: "regular" }]}>
{separate(product.product.price * product.count)}
</Text>
</View>
</View> </View>
</View> </View>
</View> </View>

@ -9,47 +9,89 @@ import {
SafeAreaView, SafeAreaView,
StatusBar, StatusBar,
LayoutAnimation, LayoutAnimation,
Appearance,
} from "react-native"; } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { userProduct, userFactor } from "../../redux/actions"; import { userProduct, userFactor } from "../../redux/actions";
import { Ionicons } from "@expo/vector-icons"; import { Ionicons } from "@expo/vector-icons";
import { useNavigation } from "@react-navigation/native";
import separate from "../../utils/separate";
//components
import Product from "./components/Product"; import Product from "./components/Product";
import Code from "./components/Code"; import Code from "./components/Code";
import CustomPressable from "../../components/Pressable"; import CustomPressable from "../../components/Pressable";
import Navbar from "../../components/Navbar"; import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer"; import Drawer from "../../components/Drawer";
import tw from "tailwind-react-native-classnames";
//style
import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
import tw from "tailwind-rn";
const { width, height } = Dimensions.get("window"); const { width, height } = Dimensions.get("window");
const PriceStatus = ({ name, value, type }) => { const PriceStatus = ({ name, value, type }) => {
const colorScheme = Appearance.getColorScheme();
return ( return (
<View style={tw.style("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.style(""),
{ fontSize: width / 31, color: "#132F52", fontFamily: "regular" },
]}
>
{name}
</Text>
<Text <Text
style={[ style={[
tw.style(""), tw(""),
{ {
color: type === "error" ? "#F1420D" : "#246E8A", fontSize: fontSize.lg,
fontSize: width / 31, color: Colors.theme1[colorScheme].gray20,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
> >
{value} {name}
</Text> </Text>
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
{
color:
type === "error"
? Colors.theme1[colorScheme].redFF1
: Colors.theme1[colorScheme].green79,
fontSize: fontSize.xl,
fontFamily: "bold",
},
]}
>
{value}
</Text>
<Text
style={[
{
color:
type === "error"
? Colors.theme1[colorScheme].redFF1
: Colors.theme1[colorScheme].green79,
fontSize: fontSize.sm,
fontFamily: "regular",
marginRight: 4,
},
]}
>
تومان
</Text>
</View>
</View> </View>
); );
}; };
function ShoppingCart({ userId, list, factorInfo, getList, getFactorInfo }) { function ShoppingCart({
userId,
list,
factorInfo,
getList,
getFactorInfo,
loading,
}) {
const navigation = useNavigation();
const colorScheme = Appearance.getColorScheme();
const [position, setPosition] = useState("100%"); const [position, setPosition] = useState("100%");
useEffect(() => { useEffect(() => {
@ -87,80 +129,113 @@ function ShoppingCart({ userId, list, factorInfo, getList, getFactorInfo }) {
contentContainerStyle={styles.contentContainerStyle} contentContainerStyle={styles.contentContainerStyle}
style={styles.container} style={styles.container}
> >
{list.length > 0 && {list
list.map((product, index) => ( ?.sort((a, b) => a?.id - b?.id)
<Product key={index} product={product} /> ?.map(
))} (product, index) =>
product.condition < 2 && (
<Product key={index} product={product} loading={loading} />
)
)}
<Code /> <Code />
<View <View
style={tw.style( style={tw(
"flex flex-col w-full border-t py-2 border-gray-300 border-b mt-6" "flex flex-col w-full border-t py-2 border-gray-300 border-b mt-6"
)} )}
> >
<PriceStatus <PriceStatus
name="مبلغ سبد خرید" name="مبلغ سبد خرید"
value={factorInfo?.sumPrice} value={separate(Math.round(factorInfo?.sumPrice))}
type="normal" type="normal"
/> />
<PriceStatus <PriceStatus
name="میزان تخفیف" name="میزان تخفیف"
value={factorInfo?.offPrice} value={separate(Math.round(factorInfo?.offPrice))}
type="error" type="error"
/> />
<PriceStatus <PriceStatus
name="مالیات بر ارزش افزوده" name="مالیات بر ارزش افزوده"
value={factorInfo?.sumPrice * 0.009} value={separate(Math.round(factorInfo?.sumPrice * 0.009))}
type="error" type="error"
/> />
</View> </View>
<View <View
style={tw.style( 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 <Text
style={[ style={[
tw.style(""), {
{ fontSize: width / 31, fontFamily: "regular" }, color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.xl,
fontFamily: "bold",
},
]} ]}
> >
جمع کل سبد خرید جمع کل سبد خرید
</Text> </Text>
<Text <View style={tw("flex flex-row-reverse items-center")}>
style={[ <Text
tw.style(""), style={[
{ fontSize: width / 31, color: "#246E8A", fontFamily: "bold" }, {
]} color: Colors.theme1[colorScheme].green79,
> fontSize: fontSize.xl,
{factorInfo?.payPrice + " " + "تومان"} fontFamily: "bold",
</Text> },
]}
>
{separate(factorInfo?.payPrice)}
</Text>
<Text
style={[
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.sm,
fontFamily: "regular",
marginRight: 4,
},
]}
>
تومان
</Text>
</View>
</View> </View>
<View style={tw.style("absolute left-0 bottom-6 w-full")}> <View style={tw("w-full")}>
<Pressable <Pressable
style={[ style={[
tw.style( tw(
"w-full rounded-md flex flex-row justify-center items-center py-2.5 px-3 my-5" "w-full rounded-md flex flex-row justify-center items-center py-3 px-3 my-5"
), ),
{ backgroundColor: "#196EC01a" }, { backgroundColor: Colors.theme1[colorScheme].greenC8 + "1a" },
]} ]}
> >
<Text <Text
style={[ style={[
tw.style("mr-1"), tw("mr-1"),
{ color: "#275077", fontSize: width / 36, fontFamily: "light" }, {
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.sm,
fontFamily: "regular",
},
]} ]}
> >
هزینه ارسال کالا پس از تعیین محل آدرس مشخص میشود هزینه ارسال کالا پس از تعیین محل آدرس مشخص میشود
</Text> </Text>
<Ionicons name="alert-circle-outline" size={20} color="#196EC0" /> <Ionicons
name="alert-circle-outline"
size={20}
color={Colors.theme1[colorScheme].greenC8}
/>
</Pressable> </Pressable>
<CustomPressable <CustomPressable
title={"ادامه فرایند خرید"} title={"ادامه فرایند خرید"}
backgroundColor="#196EC0" backgroundColor={Colors.theme1[colorScheme].greenCF}
color={"white"} color={"white"}
border={{ color: "#196EC0", width: 0 }} border={{ color: "#196EC0", width: 0 }}
width={"100%"} width={"100%"}
onPress={() => navigation.push("DeliveryForm")}
/> />
</View> </View>
</ScrollView> </ScrollView>
@ -174,6 +249,7 @@ const mapStateToProps = (state) => ({
factorInfo: state.userFactor.info, factorInfo: state.userFactor.info,
userId: state.user.status.id, userId: state.user.status.id,
hasPhysical: state.userProduct.hasPhysical, hasPhysical: state.userProduct.hasPhysical,
loading: state.userProduct.loading,
}); });
const mapDispatchToProps = { const mapDispatchToProps = {
@ -188,7 +264,6 @@ export default connect(mapStateToProps, mapDispatchToProps)(ShoppingCart);
const styles = StyleSheet.create({ const styles = StyleSheet.create({
contentContainerStyle: { contentContainerStyle: {
paddingBottom: 100, paddingBottom: 100,
flex: 1,
position: "relative", position: "relative",
}, },
container: { container: {

@ -0,0 +1,12 @@
const separate = (number) => {
number += "";
number = number.replace(",", "");
let x = number.split(".");
let y = x[0];
let z = x.length > 1 ? "." + x[1] : "";
let rgx = /(\d+)(\d{3})/;
while (rgx.test(y)) y = y.replace(rgx, "$1" + "," + "$2");
return y + z;
};
export default separate;

@ -1997,6 +1997,11 @@ blueimp-md5@^2.10.0:
resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.19.0.tgz#b53feea5498dcb53dc6ec4b823adb84b729c4af0" resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.19.0.tgz#b53feea5498dcb53dc6ec4b823adb84b729c4af0"
integrity sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w== integrity sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==
boolbase@^1.0.0, boolbase@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
bplist-creator@0.1.0: bplist-creator@0.1.0:
version "0.1.0" version "0.1.0"
resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.1.0.tgz#018a2d1b587f769e379ef5519103730f8963ba1e" resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.1.0.tgz#018a2d1b587f769e379ef5519103730f8963ba1e"
@ -2522,6 +2527,16 @@ css-in-js-utils@^2.0.0:
hyphenate-style-name "^1.0.2" hyphenate-style-name "^1.0.2"
isobject "^3.0.1" isobject "^3.0.1"
css-select@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef"
integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==
dependencies:
boolbase "^1.0.0"
css-what "^3.2.1"
domutils "^1.7.0"
nth-check "^1.0.2"
css-to-react-native@^3.0.0: css-to-react-native@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756" resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756"
@ -2531,11 +2546,24 @@ css-to-react-native@^3.0.0:
css-color-keywords "^1.0.0" css-color-keywords "^1.0.0"
postcss-value-parser "^4.0.2" postcss-value-parser "^4.0.2"
css-tree@^1.0.0-alpha.39:
version "1.1.3"
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d"
integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==
dependencies:
mdn-data "2.0.14"
source-map "^0.6.1"
css-unit-converter@^1.1.1: css-unit-converter@^1.1.1:
version "1.1.2" version "1.1.2"
resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.2.tgz#4c77f5a1954e6dbff60695ecb214e3270436ab21" resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.2.tgz#4c77f5a1954e6dbff60695ecb214e3270436ab21"
integrity sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA== integrity sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA==
css-what@^3.2.1:
version "3.4.2"
resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4"
integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==
css@^2.2.4: css@^2.2.4:
version "2.2.4" version "2.2.4"
resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929"
@ -2692,6 +2720,32 @@ dlv@^1.1.3:
resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79"
integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==
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"
domelementtype@1:
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:
version "2.2.0"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57"
integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==
domutils@^1.7.0:
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"
ee-first@1.1.1: ee-first@1.1.1:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
@ -2726,6 +2780,11 @@ end-of-stream@^1.1.0:
dependencies: dependencies:
once "^1.4.0" once "^1.4.0"
entities@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55"
integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==
envinfo@^7.7.2: envinfo@^7.7.2:
version "7.8.1" version "7.8.1"
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475"
@ -2862,6 +2921,11 @@ expo-barcode-scanner@~11.2.0:
"@expo/config-plugins" "^4.0.2" "@expo/config-plugins" "^4.0.2"
expo-image-loader "~3.1.0" expo-image-loader "~3.1.0"
expo-blur@~11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/expo-blur/-/expo-blur-11.0.0.tgz#3542afed5c0037554657d98c31a5933dd78098dd"
integrity sha512-EmIYXFwaqvVDhV4JnG9+nENU7FGZkCcuYZhoOOHjnHyADCGNsT6LIVv9/Q/rO0+qWJJxlUG6bziPHC2wbWcC9A==
expo-camera@~12.1.0: expo-camera@~12.1.0:
version "12.1.0" version "12.1.0"
resolved "https://registry.yarnpkg.com/expo-camera/-/expo-camera-12.1.0.tgz#d968b282d2155956655e217b35bade66ed361ad7" resolved "https://registry.yarnpkg.com/expo-camera/-/expo-camera-12.1.0.tgz#d968b282d2155956655e217b35bade66ed361ad7"
@ -4200,6 +4264,11 @@ md5-file@^3.2.3:
dependencies: dependencies:
buffer-alloc "^1.1.0" buffer-alloc "^1.1.0"
mdn-data@2.0.14:
version "2.0.14"
resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50"
integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==
meow@^7.0.1: meow@^7.0.1:
version "7.1.1" version "7.1.1"
resolved "https://registry.yarnpkg.com/meow/-/meow-7.1.1.tgz#7c01595e3d337fcb0ec4e8eed1666ea95903d306" resolved "https://registry.yarnpkg.com/meow/-/meow-7.1.1.tgz#7c01595e3d337fcb0ec4e8eed1666ea95903d306"
@ -4745,6 +4814,13 @@ npm-run-path@^2.0.0:
dependencies: dependencies:
path-key "^2.0.0" path-key "^2.0.0"
nth-check@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c"
integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==
dependencies:
boolbase "~1.0.0"
nullthrows@^1.1.1: nullthrows@^1.1.1:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1"
@ -5304,6 +5380,14 @@ react-native-select-dropdown@^1.6.0:
resolved "https://registry.yarnpkg.com/react-native-select-dropdown/-/react-native-select-dropdown-1.6.0.tgz#b7dbf61408b0bf7c2623ac22e27a85e04ebfc798" resolved "https://registry.yarnpkg.com/react-native-select-dropdown/-/react-native-select-dropdown-1.6.0.tgz#b7dbf61408b0bf7c2623ac22e27a85e04ebfc798"
integrity sha512-lKBVG1McWOBeeJRFo47yx5HXPkRYdMXFa05gsAqF7N6kx1rawQXHkkt+eO+wrFDAxWOMPn7mSjIi9IKhf11Vow== integrity sha512-lKBVG1McWOBeeJRFo47yx5HXPkRYdMXFa05gsAqF7N6kx1rawQXHkkt+eO+wrFDAxWOMPn7mSjIi9IKhf11Vow==
react-native-svg@^12.1.1:
version "12.1.1"
resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-12.1.1.tgz#5f292410b8bcc07bbc52b2da7ceb22caf5bcaaee"
integrity sha512-NIAJ8jCnXGCqGWXkkJ1GTzO4a3Md5at5sagYV8Vh4MXYnL4z5Rh428Wahjhh+LIjx40EE5xM5YtwyJBqOIba2Q==
dependencies:
css-select "^2.1.0"
css-tree "^1.0.0-alpha.39"
react-native-web@0.17.1: react-native-web@0.17.1:
version "0.17.1" version "0.17.1"
resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.17.1.tgz#90d473c89dd99b88bc9830b2a9fcdd2fc5f04902" resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.17.1.tgz#90d473c89dd99b88bc9830b2a9fcdd2fc5f04902"

Loading…
Cancel
Save