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. 59
      navigation/index.js
  7. 111
      src/components/BottomSheetComponents/ProductQuestion.js
  8. 81
      src/components/BottomSheetComponents/ProductReview.js
  9. 3
      src/screens/Splash/index.js
  10. 18
      src/screens/Tests/index.js
  11. 5
      src/screens/Video/index.js

@ -4,7 +4,7 @@
"slug": "RnDanovinExpo", "slug": "RnDanovinExpo",
"version": "1.0.0", "version": "1.0.0",
"orientation": "portrait", "orientation": "portrait",
"icon": "", "icon": "./src/assets/icons/logo.png",
"splash": { "splash": {
"image": "", "image": "",
"resizeMode": "contain", "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 { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack"; import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { import { Entypo, FontAwesome } from "@expo/vector-icons";
Entypo,
FontAwesome,
} from "@expo/vector-icons";
import OrderDetails from "../src/screens/OrderDetails"; import OrderDetails from "../src/screens/OrderDetails";
import OrdersFollowUp from "../src/screens/OrdersFollowUp"; import OrdersFollowUp from "../src/screens/OrdersFollowUp";
import { Dimensions } from "react-native"; import { Dimensions } from "react-native";
@ -38,8 +35,11 @@ import homeActiveIcon from "./assets/home-active.png";
import videoActiveIcon from "./assets/video-active.png"; import videoActiveIcon from "./assets/video-active.png";
import videoDeactiveIcon from "./assets/video-deactive.png"; import videoDeactiveIcon from "./assets/video-deactive.png";
import bookDeactiveIcon from "./assets/book-deactive.png"; import bookDeactiveIcon from "./assets/book-deactive.png";
import bookActiveIcon from "./assets/book-active.png";
import testDeactiveIcon from "./assets/test-deactive.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; const width = Dimensions.get("window").width;
@ -60,22 +60,27 @@ const BottomTabNavigator = () => {
tabBarLabelStyle: { tabBarLabelStyle: {
fontSize: width / 34, fontSize: width / 34,
fontFamily: "regular", fontFamily: "regular",
transform: [{translateY : -7}] transform: [{ translateY: -7 }],
}, },
tabBarShowLabel: true, tabBarShowLabel: true,
// tabBarLabel : 'reza' // tabBarLabel : 'reza'
}} }}
> >
<Tab.Screen <Tab.Screen
name="ShoppingCartTab" name="Profile"
component={ShoppingCart} component={Profile}
options={{ options={{
title : 'سبد خرید', title: "پروفایل",
tabBarIcon: ({ focused, color }) => ( tabBarIcon: ({ focused, color }) =>
<FontAwesome focused ? (
name="shopping-cart" <Image
size={32} source={profileActiveIcon}
color={color} style={{ width: 33, height: 32 }}
/>
) : (
<Image
source={profileDeactiveIcon}
style={{ width: 33, height: 32 }}
/> />
), ),
}} }}
@ -84,13 +89,14 @@ const BottomTabNavigator = () => {
name="Tests" name="Tests"
component={Tests} component={Tests}
options={{ options={{
title : 'آزمون', title: "آزمون",
tabBarIcon: ({ focused, color }) => ( focused ? tabBarIcon: ({ focused, color }) =>
<FontAwesome focused ? (
name="map" <Image
size={27} source={testActiveIcon}
color={color} style={{ width: 33, height: 32 }}
/> : />
) : (
<Image <Image
source={testDeactiveIcon} source={testDeactiveIcon}
style={{ width: 33, height: 32 }} style={{ width: 33, height: 32 }}
@ -123,9 +129,14 @@ const BottomTabNavigator = () => {
name="ProductsTab" name="ProductsTab"
component={ProductsStackScreen} component={ProductsStackScreen}
options={{ options={{
title : 'کتابها', title: "کتابها",
tabBarIcon: ({ focused, color }) => ( focused ? tabBarIcon: ({ focused, color }) =>
<Entypo name="shop" size={focused ? 27 : 23} color={color} /> : focused ? (
<Image
source={bookActiveIcon}
style={{ width: 35, height: 34 }}
/>
) : (
<Image <Image
source={bookDeactiveIcon} source={bookDeactiveIcon}
style={{ width: 35, height: 34 }} style={{ width: 35, height: 34 }}

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

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

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

@ -1,6 +1,5 @@
import { View, Text, Button } from "react-native"; import { View, Text, Button } from "react-native";
import React, {useRef} from "react"; import React, {useRef} from "react";
import RBSheet from "react-native-raw-bottom-sheet";
export default function Test() { export default function Test() {
const refRBSheet = useRef(); const refRBSheet = useRef();
@ -13,22 +12,7 @@ export default function Test() {
backgroundColor: "#fff" 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> </View>
); );
} }

@ -39,11 +39,6 @@ function Product({
setPosition(position === "100%" ? "0%" : "100%"); setPosition(position === "100%" ? "0%" : "100%");
}; };
useEffect(() => {
if(book){
console.log(book);
}
},[book]);
return ( return (
<SafeAreaView <SafeAreaView
style={{ style={{

Loading…
Cancel
Save