reza added some change

master
Reza_ashrafi 3 years ago
parent ff12b496eb
commit cb4d2d965d
  1. 1
      app.json
  2. 290
      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. 207
      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. 97
      src/constants/Colors.js
  33. 32
      src/redux/actions/book.js
  34. 1
      src/redux/actions/index.js
  35. 34
      src/redux/actions/userAddress.js
  36. 113
      src/redux/reducers/book.js
  37. 1
      src/redux/reducers/index.js
  38. 2
      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. 111
      src/screens/Home/components/Blogs.js
  48. 11
      src/screens/Home/components/Header.js
  49. 105
      src/screens/Home/components/MyBooks.js
  50. 77
      src/screens/Home/components/Scroll.js
  51. 57
      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. 14
      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. 119
      src/screens/ShoppingCart/components/Product.js
  65. 137
      src/screens/ShoppingCart/index.js
  66. 12
      src/utils/separate.js
  67. 84
      yarn.lock

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

@ -1,12 +1,15 @@
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 { createNativeStackNavigator } from "@react-navigation/native-stack";
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 OrdersFollowUp from "../src/screens/OrdersFollowUp";
import { Dimensions } from "react-native";
import Splash from "../src/screens/Splash";
import Home from "../src/screens/Home";
import Products from "../src/screens/Products";
@ -18,33 +21,23 @@ import QR from "../src/screens/QR";
import QRContent from "../src/screens/QRContent";
import Faq from "../src/screens/Faq";
import Activation from "../src/screens/Activation";
import { connect } from "react-redux";
import Profile from "../src/screens/Profile";
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 VideoDisplay from "../src/screens/VideoDisplay";
import Contact from "../src/screens/Contact";
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
import homeDeactiveIcon from "../src/assets/icons/home-deactive.png";
import homeActiveIcon from "../src/assets/icons/home-active.png";
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";
//style
import fontSize from "../src/constants/fontSize";
import Colors from "../src/constants/Colors";
const width = Dimensions.get("window").width;
const Tab = createBottomTabNavigator();
const BottomTabNavigator = () => {
const colorScheme = Appearance.getColorScheme();
return (
<Tab.Navigator
initialRouteName="HomeTab"
@ -54,11 +47,11 @@ const BottomTabNavigator = () => {
tabBarActiveTintColor: "#06BACE",
tabBarInactiveTintColor: "grey",
tabBarStyle: {
backgroundColor: "#CCE6FF",
backgroundColor: Colors.theme1[colorScheme].greenFF1,
height: 70,
},
tabBarLabelStyle: {
fontSize: width / 34,
fontSize: fontSize.xs,
fontFamily: "regular",
transform: [{ translateY: -7 }],
},
@ -68,39 +61,106 @@ const BottomTabNavigator = () => {
>
<Tab.Screen
name="Profile"
component={Profile}
component={Login}
options={{
title: "پروفایل",
tabBarIcon: ({ focused, color }) =>
focused ? (
<Image
source={profileActiveIcon}
style={{ width: 33, height: 32 }}
<Svg
xmlns="http://www.w3.org/2000/svg"
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
source={profileDeactiveIcon}
style={{ width: 33, height: 32 }}
<Svg
xmlns="http://www.w3.org/2000/svg"
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
name="Tests"
component={Tests}
name="ShoppingCart"
component={CARTStackScreen}
options={{
title: "آزمون",
title: "سبد خرید",
tabBarIcon: ({ focused, color }) =>
focused ? (
<Image
source={testActiveIcon}
style={{ width: 33, height: 32 }}
<Svg
xmlns="http://www.w3.org/2000/svg"
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
source={testDeactiveIcon}
style={{ width: 33, height: 32 }}
<Svg
xmlns="http://www.w3.org/2000/svg"
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: "ویدئوها",
tabBarIcon: ({ focused, color }) =>
focused ? (
<Image
source={videoActiveIcon}
style={{ width: 32, height: 28 }}
<Svg
xmlns="http://www.w3.org/2000/svg"
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
source={videoDeactiveIcon}
style={{ width: 32, height: 28 }}
<Svg
xmlns="http://www.w3.org/2000/svg"
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: "کتابها",
tabBarIcon: ({ focused, color }) =>
focused ? (
<Image
source={bookActiveIcon}
style={{ width: 35, height: 34 }}
<Svg
xmlns="http://www.w3.org/2000/svg"
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
source={bookDeactiveIcon}
style={{ width: 35, height: 34 }}
<Svg
xmlns="http://www.w3.org/2000/svg"
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: "خانه",
tabBarIcon: ({ focused, color }) =>
focused ? (
<Image
source={homeActiveIcon}
style={{ width: 33, height: 33 }}
<Svg
xmlns="http://www.w3.org/2000/svg"
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
source={homeDeactiveIcon}
style={{ width: 33, height: 33 }}
<Svg
xmlns="http://www.w3.org/2000/svg"
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 AuthStackScreen = () => {
return (

@ -22,6 +22,7 @@
"expo-app-loading": "~1.3.0",
"expo-av": "^10.2.0",
"expo-barcode-scanner": "~11.2.0",
"expo-blur": "~11.0.0",
"expo-camera": "~12.1.0",
"expo-device": "~4.1.0",
"expo-font": "^10.0.4",
@ -42,6 +43,7 @@
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-select-dropdown": "^1.6.0",
"react-native-svg": "^12.1.1",
"react-native-web": "0.17.1",
"react-navigation-stack": "^2.10.4",
"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 React from "react";
//style
import fontSize from "../../constants/fontSize";
import tw from "tailwind-rn";
import Colors from "../../constants/Colors";
const { width } = Dimensions.get("window");
const ProductQuestion = ({ list }) => {
const colorScheme = Appearance.getColorScheme();
const Question = ({ question }) => {
return (
<View style={[tw("flex flex-col mb-3")]}>
<Text
style={{
fontFamily: "regular",
color: "#196EC0",
fontSize: fontSize.base,
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.lg,
}}
>
سوال
@ -24,7 +28,7 @@ const ProductQuestion = ({ list }) => {
style={{
fontFamily: "regular",
color: "#323232",
fontSize: fontSize.base,
fontSize: fontSize.tiny,
}}
>
{question.question}
@ -34,8 +38,8 @@ const ProductQuestion = ({ list }) => {
<Text
style={{
fontFamily: "regular",
color: "#196EC0",
fontSize: fontSize.base,
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.lg,
marginTop: 10,
}}
>
@ -44,8 +48,8 @@ const ProductQuestion = ({ list }) => {
<Text
style={{
fontFamily: "light",
color: "#7A7A7A",
fontSize: fontSize.base,
color: Colors.theme1[colorScheme].grayCC,
fontSize: fontSize.tiny,
}}
>
{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"
),
{
backgroundColor: "#50A9FF33",
backgroundColor: Colors.theme1[colorScheme].greenFF1,
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontFamily: "regular",
fontSize: fontSize.lg,
color: Colors.theme1[colorScheme].green79,
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";
//style
import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
import tw from "tailwind-rn";
const { width } = Dimensions.get("window");
const ProductReviews = ({ list }) => {
const colorScheme = Appearance.getColorScheme();
const Property = ({ question }) => {
return (
<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"
),
{
backgroundColor: "#ECFDFF",
backgroundColor: Colors.theme1[colorScheme].greenFF1 + '66',
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontFamily: "regular",
fontSize: fontSize.tiny,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
@ -35,9 +39,10 @@ const ProductReviews = ({ list }) => {
</View>
<Text
style={{
fontSize: fontSize.base,
fontSize: fontSize.tiny,
fontFamily: "light",
color: "#275077",
lineHeight: 25
}}
>
{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"
),
{
backgroundColor: "#50A9FF33",
backgroundColor: Colors.theme1[colorScheme].greenFF1 ,
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontSize: fontSize.lg,
color: Colors.theme1[colorScheme].green79,
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";
//style
import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
import tw from "tailwind-rn";
const { width } = Dimensions.get("window");
const ProductSpecifications = ({ list }) => {
const colorScheme = Appearance.getColorScheme();
const Property = ({ prop }) => {
return (
<View style={[tw("flex flex-row-reverse mb-3")]}>
@ -21,7 +25,7 @@ const ProductSpecifications = ({ list }) => {
tw("py-3 pr-2"),
{
fontFamily: "regular",
fontSize: fontSize.base,
fontSize: fontSize.tiny,
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"
),
{
backgroundColor: "#50A9FF33",
backgroundColor: Colors.theme1[colorScheme].greenFF1 ,
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontSize: fontSize.lg,
color: Colors.theme1[colorScheme].green79 ,
fontFamily: "regular",
},
]}

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

@ -60,6 +60,13 @@ const Drawer = ({ position, setBoxPosition }) => {
toast: "",
message: "",
},
{
name: "سبد خرید",
route: "ShoppingCart",
icon: <Ionicons name="cart" size={23} color={"#555555"} />,
toast: "",
message: "",
},
{
name: "سوالات متداول",
route: "Faq",
@ -73,7 +80,7 @@ const Drawer = ({ position, setBoxPosition }) => {
icon: <Ionicons name="call" size={23} color={"#555555"} />,
toast: "",
message: "",
}
},
]);
const navigation = useNavigation();
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 {TouchableOpacity, Text} from 'react-native';
import tw from 'tailwind-rn';
import fontSize from '../constants/fontSize';
import React from "react";
import { TouchableOpacity, Text, ActivityIndicator } from "react-native";
import tw from "tailwind-rn";
import fontSize from "../constants/fontSize";
export default function Pressable1({
title,
backgroundColor,
@ -9,20 +10,30 @@ export default function Pressable1({
border,
width,
onPress,
loading,
}) {
return (
<TouchableOpacity
onPress={() => onPress()}
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,
borderWidth: border.width,
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>
);
}

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

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

@ -1,40 +1,69 @@
import React from 'react';
import {Image, Dimensions} from 'react-native';
import SelectDropdown from 'react-native-select-dropdown';
import dropdownIcon from '../assets/icons/dropdown.png';
import tw from 'tailwind-react-native-classnames';
import React from "react";
import { Appearance } from "react-native";
import Svg, { Path } from "react-native-svg";
import SelectDropdown from "react-native-select-dropdown";
//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 (
<SelectDropdown
data={options}
buttonStyle={{
width: width,
borderWidth: 1,
borderColor: '#DBDBDB',
borderColor: Colors.theme1[colorScheme].gray2077 + "66",
borderRadius: 6,
height: 36,
backgroundColor: '#F9F9F9',
fontFamily : 'light'
backgroundColor: Colors.theme1[colorScheme].grayF9,
fontFamily: "regular",
}}
rowTextStyle={{
fontSize: fontSize.sm,
fontFamily: "regular",
}}
rowTextStyle={{fontSize: Dimensions.get('window').width / 36, fontFamily : 'light'}}
defaultButtonText={defaultValue}
statusBarTranslucent={true}
buttonTextStyle={{
textAlign: 'center',
justifyContent: 'flex-end',
textAlign: "center",
justifyContent: "flex-end",
flex: 0,
fontSize: Dimensions.get('window').width / 36,
color: '#707070',
fontFamily : 'light'
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].gray2077,
fontFamily: "regular",
// display: 'inline'
}}
dropdownIconPosition={iconPosition}
onSelect={selectedItem => {
onChange(selectedItem);
onSelect={(selectedItem) => {
onChange(name, selectedItem);
}}
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;
Select.defaultProps = {
options: ['1', '2', '3'],
iconPosition: 'left',
options: ["1", "2", "3"],
iconPosition: "left",
};

@ -1,20 +1,87 @@
const Colors = {
theme1 : {
light : {
blue1 : '#E9F0FF',
blue2 : '#D7E3FC',
blue3 : '#D3E9FF',
blue4 : '#2B8DEB',
blue5 : "#196EC0",
blue6 : '#05335F',
blue7 : '#235A90',
blue8 : '#86A0B9',
theme1: {
light: {
//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",
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: {
//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"
},
},
dark : {
}
}
};
export default Colors;

@ -10,35 +10,9 @@ const book = {
await proxy.get("book/info", data, { dispatch }),
setLessonActive: (data) => async (dispatch) =>
await dispatch({ type: "book/lesson/active", data: data }),
gradeFilter: (data) => async (dispatch) =>
await dispatch({ type: "book/gradeFilter", 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 });
// },
setFilterOptions: (data) => async (dispatch) => {
dispatch({ type: "book/setFilterOptions", data: data });
},
};
export default book;

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

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

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

@ -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,55 +6,52 @@ import {
Dimensions,
TouchableOpacity,
FlatList,
Pressable
} from "react-native";
import { connect } from "react-redux";
import Svg, { G, Path } from "react-native-svg";
//components
import Header from "../components/Header";
import fontSize from "../../../constants/fontSize";
//Style
import tw from "tailwind-rn";
import Color from "../../../constants/Colors";
import fontSize from "../../../constants/fontSize";
//asssets
import userImage from "../assets/user.png";
import messageIcon from "../assets/message.png";
//Color
import Color from "../../../constants/Colors";
const { width} = Dimensions.get("window");
function Blogs({ blogs }) {
return (
<View style={[tw("flex flex-col pr-3 mb-5")]}>
<View style={tw("w-full pl-3")}>
<Header title={"خواندنیها"} route={"Blogs"} />
</View>
<FlatList
showsHorizontalScrollIndicator={false}
horizontal={true}
inverted={true}
style={[tw("flex flex-row mt-3")]}
data={blogs}
renderItem={({ item }) => <Blog blog={item} />}
keyExtractor={(item) => item.id}
/>
</View>
);
}
const { width } = Dimensions.get("window");
const Blog = ({ blog }) => {
function Blogs({ blogs }) {
const Blog = ({ blog }) => {
return (
<TouchableOpacity
<Pressable
style={[
tw("rounded-md ml-3 rounded-md relative"),
{ width: width / 1.5},
{ 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}]}
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
@ -63,24 +60,24 @@ const Blog = ({ blog }) => {
{
color: Color.theme1.light.blue7,
fontFamily: "bold",
fontSize: fontSize.sm,
fontSize: fontSize.tiny,
},
]}
>
{blog.title}
</Text>
<View style={tw("flex flex-row-reverse justify-between")}>
<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 }]}
style={[tw("rounded-full ml-1"), { width: 16, height: 16 }]}
/>
<Text
style={[
{
color: Color.theme1.light.blue5,
fontFamily: "light",
fontSize: fontSize.xs,
fontFamily: "regular",
fontSize: fontSize.sm,
},
]}
>
@ -90,28 +87,62 @@ const Blog = ({ blog }) => {
<View style={tw("flex-row-reverse items-center")}>
<Text
style={[
tw("ml-1"),
{
color: Color.theme1.light.blue5,
fontFamily: "light",
fontSize: fontSize.xs,
fontFamily: "regular",
fontSize: fontSize.sm,
},
]}
>
۳۰ دقیقه
</Text>
<Image
source={messageIcon}
style={[tw("rounded-full mr-1"), { width: 13, height: 13 }]}
<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>
</TouchableOpacity>
</Pressable>
);
};
};
return (
<View style={[tw("flex flex-col pr-3 mb-5")]}>
<View style={tw("w-full pl-3")}>
<Header title={"خواندنیها"} route={"Blogs"} />
</View>
<FlatList
showsHorizontalScrollIndicator={false}
horizontal={true}
inverted={true}
style={[tw("flex flex-row mt-3 pb-7")]}
data={blogs}
renderItem={({ item }) => <Blog blog={item} />}
keyExtractor={(item) => item.id}
/>
</View>
);
}
const mapStateToProps = (state) => ({
// features: state.publicApi.home?.features,
});
export default connect(mapStateToProps, {})(Blogs);

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

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

@ -1,49 +1,13 @@
import React from "react";
import {
View,
Image,
TouchableOpacity,
FlatList,
} from "react-native";
import { View, Image, TouchableOpacity, FlatList } from "react-native";
import { useNavigation } from "@react-navigation/native";
import Header from "../components/Header";
import tw from "tailwind-rn";
import { connect } from "react-redux";
function Scroll({ books }) {
return (
<View style={[tw("flex flex-col px-3 mb-5")]}>
<Header title={"فروشگاه"} route={"Products"} />
<FlatList
showsHorizontalScrollIndicator={false}
horizontal={true}
inverted={true}
style={[tw("mt-3 pb-2")]}
data={[{ id: 0 }]}
renderItem={({}) => <Box books={books} />}
keyExtractor={(item) => item.id}
/>
</View>
);
}
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 Box = ({ books }) => {
const Product = ({ book, position }) => {
const navigation = useNavigation();
return (
<TouchableOpacity
@ -55,7 +19,9 @@ const Product = ({ book, position }) => {
height: position === 0 ? 245 : 118,
},
]}
onPress={() => navigation.navigate("Product", { id : book.id, type : 'book'})}
onPress={() =>
navigation.navigate("Product", { id: book.id, type: "book" })
}
>
<Image
source={{ uri: `https://dnvn.ir/api/v1/file/${book.fileIds}` }}
@ -63,9 +29,36 @@ const Product = ({ book, position }) => {
/>
</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 (
<View style={[tw("flex flex-col pr-3 mb-5")]}>
<FlatList
showsHorizontalScrollIndicator={false}
horizontal={true}
inverted={true}
style={[tw("mt-3 pb-2")]}
data={[{ id: 0 }]}
renderItem={({}) => <Box books={books} />}
keyExtractor={(item) => item.id}
/>
</View>
);
}
const mapStateToProps = (state) => ({
// features: state.publicApi.home?.features,
});
export default connect(mapStateToProps, {})(Scroll);

@ -1,38 +1,18 @@
import { View, Text, Image, TouchableOpacity, FlatList } from "react-native";
import { useNavigation } from "@react-navigation/native";
import tw from "tailwind-rn";
import fontSize from "../../../constants/fontSize";
import { connect } from "react-redux";
//components
import Progress from "../../../components/Progress";
import Header from "../components/Header";
//Color
//style
import Color from "../../../constants/Colors";
import fontSize from "../../../constants/fontSize";
function Videos({ videos, grades }) {
return (
<View style={[tw("w-full px-2 mb-5")]}>
<View
style={[
tw("w-full flex flex-col rounded-md pt-2 px-2 overflow-hidden"),
]}
>
<Header title="دورههای ویدئویی شما" route={"VOD"} />
<FlatList
showsHorizontalScrollIndicator={false}
style={[tw("py-3")]}
horizontal={true}
inverted={true}
data={videos}
renderItem={({ item }) => <Video video={item} grades={grades} />}
keyExtractor={(item) => item.id}
/>
</View>
</View>
);
}
const Video = ({ video, grades }) => {
const Video = ({ video }) => {
const navigation = useNavigation();
return (
<TouchableOpacity
@ -55,7 +35,7 @@ const Video = ({ video, grades }) => {
{
color: Color.theme1.light.blue6,
fontFamily: "bold",
fontSize: fontSize.sm,
fontSize: fontSize.tiny,
},
]}
>
@ -67,7 +47,7 @@ const Video = ({ video, grades }) => {
{
color: Color.theme1.light.blue5,
fontFamily: "light",
fontSize: fontSize.xs,
fontSize: fontSize.sm,
},
]}
>
@ -76,7 +56,28 @@ const Video = ({ video, grades }) => {
<Progress percent={60} alignItems={"items-end"} />
</TouchableOpacity>
);
};
};
return (
<View style={[tw("w-full px-2 mb-5")]}>
<View
style={[
tw("w-full flex flex-col rounded-md pt-2 px-2 overflow-hidden"),
]}
>
<Header title="دورههای ویدئویی شما" route={"VOD"} />
<FlatList
showsHorizontalScrollIndicator={false}
style={[tw("py-3")]}
horizontal={true}
inverted={true}
data={videos}
renderItem={({ item }) => <Video video={item} />}
keyExtractor={(item) => item.id}
/>
</View>
</View>
);
}
const mapStateToProps = (state) => ({
grades: state.publicApi.grades,

@ -18,6 +18,7 @@ import MyBooks from "./components/MyBooks";
import Videos from "./components/Videos";
import Blogs from "./components/Blogs";
import Drawer from "../../components/Drawer";
import Header from "./components/Header";
// import { SafeAreaView } from 'react-native-safe-area-context';
@ -70,6 +71,9 @@ const Home = ({
style={[styles.container, tw("w-full flex flex-col")]}
>
{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 && <Videos videos={books} />}
{blogs.length > 0 && <Blogs blogs={blogs} />}
@ -81,7 +85,7 @@ const Home = ({
// Later on in your styles..
const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 100,
paddingBottom: 60,
},
container: {
width: Dimensions.get("window").width,

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

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

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

@ -1,11 +1,15 @@
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 { Entypo } from "@expo/vector-icons";
//style
import tw from "tailwind-react-native-classnames";
import fontSize from "../../../constants/fontSize";
import { Entypo } from "@expo/vector-icons";
import Colors from "../../../constants/Colors";
export default function Description({ title, component, height }) {
const colorScheme = Appearance.getColorScheme();
const refRBSheet = useRef();
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"
),
{
backgroundColor: "#50A9FF33",
backgroundColor: Colors.theme1[colorScheme].greenCF,
// borderWidth : 1,
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontFamily: "regular",
fontSize: fontSize.tiny,
color: "white",
fontFamily: "bold",
},
tw.style(""),
]}
>
{title}
</Text>
<Entypo name="chevron-small-left" size={20} color="#196EC0" />
<Entypo name="chevron-small-left" size={20} color="white" />
</TouchableOpacity>
<RBSheet
ref={refRBSheet}

@ -1,4 +1,4 @@
import React, { useState, useEffect } from "react";
import React, { useEffect } from "react";
import {
View,
StyleSheet,
@ -6,14 +6,12 @@ import {
ScrollView,
SafeAreaView,
StatusBar,
LayoutAnimation,
} from "react-native";
import Book from "./components/Book";
import Video from "./components/Video";
import { connect } from "react-redux";
import {book} from "../../redux/actions";
import { connect } from "react-redux";
import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer";
function Product({
route,
@ -21,15 +19,10 @@ function Product({
getBook,
grades,
}) {
const [position, setPosition] = useState("100%");
useEffect(() => {
getBook({id : route.params.id});
},[]);
const setBoxPosition = () => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
setPosition(position === "100%" ? "0%" : "100%");
};
return (
<SafeAreaView
style={{
@ -49,7 +42,6 @@ function Product({
back: true,
}}
/>
<Drawer setBoxPosition={setBoxPosition} position={position} />
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
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 {
View,
ScrollView,
StyleSheet,
Dimensions,
SafeAreaView,
StatusBar,
LayoutAnimation,
} from "react-native";
import { connect } from "react-redux";
import { book } from "../../redux/actions";
import tw from "tailwind-rn";
import Book from "./components/Book";
import Search from "../../components/Search";
import Select from "../../components/Select";
//components
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 [productType, setProductType] = useState("کتاب فیزیکی");
const [grade, setGrade] = useState("");
const [search, setSearch] = useState("");
useEffect(() => {}, []);
useEffect(() => {
getBooks({ vod: true });
}, []);
const setBoxPosition = () => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
setPosition(position === "100%" ? "0%" : "100%");
};
const onChange = (name, value) => {};
return (
<SafeAreaView
style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative",
// backgroundColor: "white",
}}
>
<Drawer setBoxPosition={setBoxPosition} position={position} />
<View style={tw("flex flex-col px-4 h-28 bg-white")}>
<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>
<Header />
<ScrollView contentContainerStyle={{ paddingBottom: 100 }}>
<View
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>
<Main books={books} grades={grades} />
</ScrollView>
</SafeAreaView>
);
@ -91,6 +53,7 @@ const mapStateToProps = (state) => ({
const mapDispatchToProps = {
getBooks: book.list,
setFilterOptions: book.setFilterOptions,
};
export default connect(mapStateToProps, mapDispatchToProps)(Products);

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

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

@ -9,47 +9,89 @@ import {
SafeAreaView,
StatusBar,
LayoutAnimation,
Appearance,
} from "react-native";
import { connect } from "react-redux";
import { userProduct, userFactor } from "../../redux/actions";
import { Ionicons } from "@expo/vector-icons";
import { useNavigation } from "@react-navigation/native";
import separate from "../../utils/separate";
//components
import Product from "./components/Product";
import Code from "./components/Code";
import CustomPressable from "../../components/Pressable";
import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer";
import 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 PriceStatus = ({ name, value, type }) => {
const colorScheme = Appearance.getColorScheme();
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" },
tw(""),
{
fontSize: fontSize.lg,
color: Colors.theme1[colorScheme].gray20,
fontFamily: "bold",
},
]}
>
{name}
</Text>
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
tw.style(""),
{
color: type === "error" ? "#F1420D" : "#246E8A",
fontSize: width / 31,
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>
);
};
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%");
useEffect(() => {
@ -87,80 +129,113 @@ function ShoppingCart({ userId, list, factorInfo, getList, getFactorInfo }) {
contentContainerStyle={styles.contentContainerStyle}
style={styles.container}
>
{list.length > 0 &&
list.map((product, index) => (
<Product key={index} product={product} />
))}
{list
?.sort((a, b) => a?.id - b?.id)
?.map(
(product, index) =>
product.condition < 2 && (
<Product key={index} product={product} loading={loading} />
)
)}
<Code />
<View
style={tw.style(
style={tw(
"flex flex-col w-full border-t py-2 border-gray-300 border-b mt-6"
)}
>
<PriceStatus
name="مبلغ سبد خرید"
value={factorInfo?.sumPrice}
value={separate(Math.round(factorInfo?.sumPrice))}
type="normal"
/>
<PriceStatus
name="میزان تخفیف"
value={factorInfo?.offPrice}
value={separate(Math.round(factorInfo?.offPrice))}
type="error"
/>
<PriceStatus
name="مالیات بر ارزش افزوده"
value={factorInfo?.sumPrice * 0.009}
value={separate(Math.round(factorInfo?.sumPrice * 0.009))}
type="error"
/>
</View>
<View
style={tw.style(
style={tw(
"flex flex-row-reverse justify-between items-center w-full py-3"
)}
>
<Text
style={[
tw.style(""),
{ fontSize: width / 31, fontFamily: "regular" },
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.xl,
fontFamily: "bold",
},
]}
>
جمع کل سبد خرید
</Text>
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
tw.style(""),
{ fontSize: width / 31, color: "#246E8A", fontFamily: "bold" },
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.xl,
fontFamily: "bold",
},
]}
>
{factorInfo?.payPrice + " " + "تومان"}
{separate(factorInfo?.payPrice)}
</Text>
<Text
style={[
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.sm,
fontFamily: "regular",
marginRight: 4,
},
]}
>
تومان
</Text>
</View>
</View>
<View style={tw.style("absolute left-0 bottom-6 w-full")}>
<View style={tw("w-full")}>
<Pressable
style={[
tw.style(
"w-full rounded-md flex flex-row justify-center items-center py-2.5 px-3 my-5"
tw(
"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
style={[
tw.style("mr-1"),
{ color: "#275077", fontSize: width / 36, fontFamily: "light" },
tw("mr-1"),
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.sm,
fontFamily: "regular",
},
]}
>
هزینه ارسال کالا پس از تعیین محل آدرس مشخص میشود
</Text>
<Ionicons name="alert-circle-outline" size={20} color="#196EC0" />
<Ionicons
name="alert-circle-outline"
size={20}
color={Colors.theme1[colorScheme].greenC8}
/>
</Pressable>
<CustomPressable
title={"ادامه فرایند خرید"}
backgroundColor="#196EC0"
backgroundColor={Colors.theme1[colorScheme].greenCF}
color={"white"}
border={{ color: "#196EC0", width: 0 }}
width={"100%"}
onPress={() => navigation.push("DeliveryForm")}
/>
</View>
</ScrollView>
@ -174,6 +249,7 @@ const mapStateToProps = (state) => ({
factorInfo: state.userFactor.info,
userId: state.user.status.id,
hasPhysical: state.userProduct.hasPhysical,
loading: state.userProduct.loading,
});
const mapDispatchToProps = {
@ -188,7 +264,6 @@ export default connect(mapStateToProps, mapDispatchToProps)(ShoppingCart);
const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 100,
flex: 1,
position: "relative",
},
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"
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:
version "0.1.0"
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"
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:
version "3.0.0"
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"
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:
version "1.1.2"
resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.2.tgz#4c77f5a1954e6dbff60695ecb214e3270436ab21"
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:
version "2.2.4"
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"
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:
version "1.1.1"
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:
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:
version "7.8.1"
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-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:
version "12.1.0"
resolved "https://registry.yarnpkg.com/expo-camera/-/expo-camera-12.1.0.tgz#d968b282d2155956655e217b35bade66ed361ad7"
@ -4200,6 +4264,11 @@ md5-file@^3.2.3:
dependencies:
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:
version "7.1.1"
resolved "https://registry.yarnpkg.com/meow/-/meow-7.1.1.tgz#7c01595e3d337fcb0ec4e8eed1666ea95903d306"
@ -4745,6 +4814,13 @@ npm-run-path@^2.0.0:
dependencies:
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:
version "1.1.1"
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"
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:
version "0.17.1"
resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.17.1.tgz#90d473c89dd99b88bc9830b2a9fcdd2fc5f04902"

Loading…
Cancel
Save