reza added some change

master
Reza_ashrafi 3 years ago
parent 73bb287197
commit 6c201d9097
  1. 2
      app.json
  2. BIN
      navigation/assets/book-active.png
  3. BIN
      navigation/assets/profile-active.png
  4. BIN
      navigation/assets/profile-deactive.png
  5. BIN
      navigation/assets/test-active.png
  6. 79
      navigation/index.js
  7. 127
      src/components/BottomSheetComponents/ProductQuestion.js
  8. 93
      src/components/BottomSheetComponents/ProductReview.js
  9. 3
      src/screens/Splash/index.js
  10. 18
      src/screens/Tests/index.js
  11. 7
      src/screens/Video/index.js

@ -4,7 +4,7 @@
"slug": "RnDanovinExpo",
"version": "1.0.0",
"orientation": "portrait",
"icon": "",
"icon": "./src/assets/icons/logo.png",
"splash": {
"image": "",
"resizeMode": "contain",

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

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

@ -1,4 +1,5 @@
import { View, Text, ScrollView, Dimensions } from "react-native";
import Divider from "../Divider";
import React from "react";
import fontSize from "../../constants/fontSize";
@ -7,47 +8,52 @@ import tw from "tailwind-rn";
const { width } = Dimensions.get("window");
const ProductQuestion = ({ list }) => {
const Property = ({ prop }) => {
const Question = ({ question }) => {
return (
<View style={[tw("flex flex-row-reverse mb-3")]}>
<View
style={[
tw("rounded-md rounded-md"),
{ backgroundColor: "#f8f8f8", width: width / 3.5 },
]}
<View style={[tw("flex flex-col mb-3")]}>
<Text
style={{
fontFamily: "regular",
color: "#196EC0",
fontSize: fontSize.base,
}}
>
<Text
style={[
tw("py-3 pr-2"),
{
fontFamily: "regular",
fontSize: fontSize.base,
color: "#07AFAF",
},
]}
>
{persian[prop]}
</Text>
</View>
<View
style={[
tw("flex-1 mr-2 rounded-md px-2 py-3"),
{ backgroundColor: "#f8f8f8" },
]}
سوال
</Text>
<Text
style={{
fontFamily: "regular",
color: "#323232",
fontSize: fontSize.base,
}}
>
<Text
style={[
tw("text-right"),
{
{question.question}
</Text>
{question.answer && (
<>
<Text
style={{
fontFamily: "regular",
fontSize: fontSize.sm,
color: "#646464",
},
]}
>
{list[prop]}
</Text>
</View>
color: "#196EC0",
fontSize: fontSize.base,
marginTop: 10,
}}
>
پاسخ
</Text>
<Text
style={{
fontFamily: "light",
color: "#7A7A7A",
fontSize: fontSize.base,
}}
>
{question.question}
</Text>
</>
)}
{/* <View></View> */}
<Divider type="vertical" />
</View>
);
};
@ -73,12 +79,12 @@ const ProductQuestion = ({ list }) => {
},
]}
>
مشخصات محصول
پرسش و پاسخ
</Text>
</View>
<ScrollView style={tw("flex-1")}>
{Object?.keys(list)?.map((prop, index) => (
<Property prop={prop} key={index} />
{list.map((question, index) => (
<Question question={question} key={index} />
))}
</ScrollView>
</View>
@ -88,23 +94,26 @@ const ProductQuestion = ({ list }) => {
export default ProductQuestion;
ProductQuestion.defaultProps = {
list: {
display: "IPS LCD 4K Samsung backlight",
weight: "2 کیلوگرم",
proccessor: "Intel core I7 11700H",
graphic: "Nvidia 3090TI 6GB",
audio: "Sonic master",
keyboard: "جزیره ای",
accessories: "کیف + کابل تبدیل برق شهری",
},
};
const persian = {
display: "صفحه نمایش",
weight: "وزن",
proccessor: "پردازنده",
graphic: "پردازنده گرافیکی",
audio: "کارت صدا",
keyboard: "کیبرد",
accessories: "متعلقات جعبه",
list: [
{
question:
"خالد حسینی تو رمان باد بادک باز مینویسه : ﻣﺮﺩ ﺁﻫﺴﺘﻪ ﺩﺭ ﮔﻮﺵ ﻓﺮﺯﻧﺪ ﺗﺎﺯﻩ ﺑﻪ ﺑﻠﻮﻍ ﺭﺳﯿﺪﻩ ﺍﺵ ﺑﺮﺍﯼ ﭘﻨﺪ ﭼﻨﯿﻦ ﻧﺠﻮﺍ ﮐﺮﺩ؟",
answer:
"خالد حسینی تو رمان باد بادک باز مینویسه : ﻣﺮﺩ ﺁﻫﺴﺘﻪ ﺩﺭ ﮔﻮﺵ ﻓﺮﺯﻧﺪ ﺗﺎﺯﻩ ﺑﻪ ﺑﻠﻮﻍ ﺭﺳﯿﺪﻩ ﺍﺵ ﺑﺮﺍﯼ ﭘﻨﺪ ﭼﻨﯿﻦ ﻧﺠﻮﺍ ﮐﺮﺩ : ” ﭘﺴﺮﻡ ﺩﺭ ﺯﻧﺪﮔﯽ ﻫﺮﮔﺰ ﺩﺯﺩﯼ ﻧﮑﻦ ” ﭘﺴﺮ ﻣﺘﻌﺠﺐ ﻭ ﻣﺒﻬﻮﺕ ﺑﻪ ﭘﺪﺭ ﻧﮕﺎﻩ ﮐﺮﺩ ﺑﺪﯾﻦ ﻣﻌﻨﺎ ﮐﻪ ﺍﻭ ﻫﺮﮔﺰ ﺩﺳﺖ ﮐﺞ ﻧﺪﺍﺷﺘﻪ ﭘﺪﺭ ﺑﻪ ﻧﮕﺎﻩ ﻣﺘﻌﺠﺐ ﻓﺮﺯﻧﺪ ﻟﺒﺨﻨﺪﯼ ﺯﺩ ﻭ ﺍﺩﺍﻣﻪ ",
like: 10,
},
{
question:
"خالد حسینی تو رمان باد بادک باز مینویسه : ﻣﺮﺩ ﺁﻫﺴﺘﻪ ﺩﺭ ﮔﻮﺵ ﻓﺮﺯﻧﺪ ﺗﺎﺯﻩ ﺑﻪ ﺑﻠﻮﻍ ﺭﺳﯿﺪﻩ ﺍﺵ ﺑﺮﺍﯼ ﭘﻨﺪ ﭼﻨﯿﻦ ﻧﺠﻮﺍ ﮐﺮﺩ؟",
answer: null,
like: 0,
},
{
question:
"خالد حسینی تو رمان باد بادک باز مینویسه : ﻣﺮﺩ ﺁﻫﺴﺘﻪ ﺩﺭ ﮔﻮﺵ ﻓﺮﺯﻧﺪ ﺗﺎﺯﻩ ﺑﻪ ﺑﻠﻮﻍ ﺭﺳﯿﺪﻩ ﺍﺵ ﺑﺮﺍﯼ ﭘﻨﺪ ﭼﻨﯿﻦ ﻧﺠﻮﺍ ﮐﺮﺩ؟",
answer:
"خالد حسینی تو رمان باد بادک باز مینویسه : ﻣﺮﺩ ﺁﻫﺴﺘﻪ ﺩﺭ ﮔﻮﺵ ﻓﺮﺯﻧﺪ ﺗﺎﺯﻩ ﺑﻪ ﺑﻠﻮﻍ ﺭﺳﯿﺪﻩ ﺍﺵ ﺑﺮﺍﯼ ﭘﻨﺪ ﭼﻨﯿﻦ ﻧﺠﻮﺍ ﮐﺮﺩ : ” ﭘﺴﺮﻡ ﺩﺭ ﺯﻧﺪﮔﯽ ﻫﺮﮔﺰ ﺩﺯﺩﯼ ﻧﮑﻦ ” ﭘﺴﺮ ﻣﺘﻌﺠﺐ ﻭ ﻣﺒﻬﻮﺕ ﺑﻪ ﭘﺪﺭ ﻧﮕﺎﻩ ﮐﺮﺩ ﺑﺪﯾﻦ ﻣﻌﻨﺎ ﮐﻪ ﺍﻭ ﻫﺮﮔﺰ ﺩﺳﺖ ﮐﺞ ﻧﺪﺍﺷﺘﻪ ﭘﺪﺭ ﺑﻪ ﻧﮕﺎﻩ ﻣﺘﻌﺠﺐ ﻓﺮﺯﻧﺪ ﻟﺒﺨﻨﺪﯼ ﺯﺩ ﻭ ﺍﺩﺍﻣﻪ ",
like: 10,
},
],
};

@ -7,46 +7,56 @@ import tw from "tailwind-rn";
const { width } = Dimensions.get("window");
const ProductReviews = ({ list }) => {
const Property = ({ prop }) => {
const Property = ({ question }) => {
return (
<View style={[tw("flex flex-row-reverse mb-3")]}>
<View style={[tw("flex flex-col mb-3")]}>
<View
onPress={() => refRBSheet.current.open()}
style={[
tw("rounded-md rounded-md"),
{ backgroundColor: "#f8f8f8", width: width / 3.5 },
tw(
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4"
),
{
backgroundColor: "#ECFDFF",
},
]}
>
<Text
style={[
tw("py-3 pr-2"),
{
fontFamily: "regular",
fontSize: fontSize.base,
color: "#07AFAF",
color: "#275077",
fontFamily: "regular",
},
]}
>
{persian[prop]}
{question.title}
</Text>
</View>
<View
style={[
tw("flex-1 mr-2 rounded-md px-2 py-3"),
{ backgroundColor: "#f8f8f8" },
]}
<Text
style={{
fontSize: fontSize.base,
fontFamily: "light",
color: "#275077",
}}
>
<Text
style={[
tw("text-right"),
{
fontFamily: "regular",
fontSize: fontSize.sm,
color: "#646464",
},
]}
>
{list[prop]}
</Text>
{question.text}
</Text>
<View style={[tw("flex flex-row justify-between mt-4")]}>
{question.images.map((image, index) => (
<View
style={[
tw("rounded-md flex flex-row justify-center items-center"),
{
width: width / 2 - 24,
height: width / 2 - 24,
backgroundColor: "#F6F6F6",
},
]}
>
<Text>Pic</Text>
</View>
))}
</View>
</View>
);
@ -57,7 +67,7 @@ const ProductReviews = ({ list }) => {
onPress={() => refRBSheet.current.open()}
style={[
tw(
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4"
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-2"
),
{
backgroundColor: "#50A9FF33",
@ -73,12 +83,12 @@ const ProductReviews = ({ list }) => {
},
]}
>
مشخصات محصول
نقد بررسی و توضیحات تکمیلی محصول
</Text>
</View>
<ScrollView style={tw("flex-1")}>
{Object?.keys(list)?.map((prop, index) => (
<Property prop={prop} key={index} />
{list?.map((question, index) => (
<Property question={question} key={index} />
))}
</ScrollView>
</View>
@ -88,23 +98,12 @@ const ProductReviews = ({ list }) => {
export default ProductReviews;
ProductReviews.defaultProps = {
list: {
display: "IPS LCD 4K Samsung backlight",
weight: "2 کیلوگرم",
proccessor: "Intel core I7 11700H",
graphic: "Nvidia 3090TI 6GB",
audio: "Sonic master",
keyboard: "جزیره ای",
accessories: "کیف + کابل تبدیل برق شهری",
},
list: [
{
title: "آیا ارزش خرید دارد یا خیر؟",
text: "هر نفسی که فرو می بریم، مرگی را که مدام به ما دست اندازی میکند پس میزند... در نهایت این مرگ است که باید پیروز شود، زیرا از هنگام تولد بخشی از سرنوشت ما شده و فقط مدت کوتاهی پیش از بلعیدن طعمه اش، با آن بازی می کند. با این همه، ما تا آنجا که ممکن است، با علاقه فراوان و دلواپسی زیاد به زندگی ادامه می دهیم، همان طور که تا آنجا که ممکن است طولانی تر در یک حباب صابون می دمیم تا بزرگتر شود، گر چه با قطعیتی تمام می دانیم که خواهد ترکید و ",
images: [0, 1],
},
],
};
const persian = {
display: "صفحه نمایش",
weight: "وزن",
proccessor: "پردازنده",
graphic: "پردازنده گرافیکی",
audio: "کارت صدا",
keyboard: "کیبرد",
accessories: "متعلقات جعبه",
};

@ -10,8 +10,7 @@ function Splash({ navigation, isLogin }) {
useEffect(() => {
if (isLogin !== null) {
setTimeout(() => {
// isLogin === false
0
isLogin === false
? navigation.navigate("Login")
: navigation.navigate("Root");
}, 3000);

@ -1,6 +1,5 @@
import { View, Text, Button } from "react-native";
import React, {useRef} from "react";
import RBSheet from "react-native-raw-bottom-sheet";
export default function Test() {
const refRBSheet = useRef();
@ -13,22 +12,7 @@ export default function Test() {
backgroundColor: "#fff"
}}
>
<Button title="OPEN BOTTOM SHEET" onPress={() => refRBSheet.current.open()} />
<RBSheet
ref={refRBSheet}
closeOnDragDown={true}
closeOnPressMask={true}
customStyles={{
wrapper: {
backgroundColor: "transparent"
},
draggableIcon: {
backgroundColor: "#000"
}
}}
>
<Text>reza</Text>
</RBSheet>
</View>
);
}

@ -38,12 +38,7 @@ function Product({
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
setPosition(position === "100%" ? "0%" : "100%");
};
useEffect(() => {
if(book){
console.log(book);
}
},[book]);
return (
<SafeAreaView
style={{

Loading…
Cancel
Save