diff --git a/app.json b/app.json index a630017..1cc1a97 100644 --- a/app.json +++ b/app.json @@ -4,7 +4,7 @@ "slug": "RnDanovinExpo", "version": "1.0.0", "orientation": "portrait", - "icon": "", + "icon": "./src/assets/icons/logo.png", "splash": { "image": "", "resizeMode": "contain", diff --git a/navigation/assets/book-active.png b/navigation/assets/book-active.png new file mode 100644 index 0000000..43988f2 Binary files /dev/null and b/navigation/assets/book-active.png differ diff --git a/navigation/assets/profile-active.png b/navigation/assets/profile-active.png new file mode 100644 index 0000000..4c150fe Binary files /dev/null and b/navigation/assets/profile-active.png differ diff --git a/navigation/assets/profile-deactive.png b/navigation/assets/profile-deactive.png new file mode 100644 index 0000000..1154d2e Binary files /dev/null and b/navigation/assets/profile-deactive.png differ diff --git a/navigation/assets/test-active.png b/navigation/assets/test-active.png new file mode 100644 index 0000000..719dcdb Binary files /dev/null and b/navigation/assets/test-active.png differ diff --git a/navigation/index.js b/navigation/index.js index 1291aa3..6fbaae2 100644 --- a/navigation/index.js +++ b/navigation/index.js @@ -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' }} > ( - - ), + title: "پروفایل", + tabBarIcon: ({ focused, color }) => + focused ? ( + + ) : ( + + ), }} /> ( focused ? - : - + focused ? ( + + ) : ( + - ), + ), }} /> focused ? ( { name="ProductsTab" component={ProductsStackScreen} options={{ - title : 'کتاب‌ها', - tabBarIcon: ({ focused, color }) => ( focused ? - : - + focused ? ( + + ) : ( + - ), + ), }} /> focused ? ( { - const Property = ({ prop }) => { + const Question = ({ question }) => { return ( - - + - - {persian[prop]} - - - + - + {question.answer && ( + <> + - {list[prop]} - - + color: "#196EC0", + fontSize: fontSize.base, + marginTop: 10, + }} + > + پاسخ + + + {question.question} + + + )} + {/* */} + ); }; @@ -73,12 +79,12 @@ const ProductQuestion = ({ list }) => { }, ]} > - مشخصات محصول + پرسش و پاسخ - {Object?.keys(list)?.map((prop, index) => ( - + {list.map((question, index) => ( + ))} @@ -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, + }, + ], }; diff --git a/src/components/BottomSheetComponents/ProductReview.js b/src/components/BottomSheetComponents/ProductReview.js index 9e7d382..48f7d25 100644 --- a/src/components/BottomSheetComponents/ProductReview.js +++ b/src/components/BottomSheetComponents/ProductReview.js @@ -7,46 +7,56 @@ import tw from "tailwind-rn"; const { width } = Dimensions.get("window"); const ProductReviews = ({ list }) => { - const Property = ({ prop }) => { + const Property = ({ question }) => { return ( - + 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", + }, ]} > - {persian[prop]} + {question.title} - - - {list[prop]} - + {question.text} + + + {question.images.map((image, index) => ( + + Pic + + ))} ); @@ -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 }) => { }, ]} > - مشخصات محصول + نقد بررسی و توضیحات تکمیلی محصول - {Object?.keys(list)?.map((prop, index) => ( - + {list?.map((question, index) => ( + ))} @@ -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: "متعلقات جعبه", -}; diff --git a/src/screens/Splash/index.js b/src/screens/Splash/index.js index ea40497..822a07b 100644 --- a/src/screens/Splash/index.js +++ b/src/screens/Splash/index.js @@ -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); diff --git a/src/screens/Tests/index.js b/src/screens/Tests/index.js index 3033e04..2b7e245 100644 --- a/src/screens/Tests/index.js +++ b/src/screens/Tests/index.js @@ -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" }} > -