diff --git a/App.js b/App.js
index ea92559..9b96c3b 100644
--- a/App.js
+++ b/App.js
@@ -9,9 +9,9 @@ import store from './src/redux/store';
const App = () => {
let [fontsLoaded] = useFonts({
- light : require("./assets/fonts/Farsi/Regular.ttf"),
- regular: require("./assets/fonts/Farsi/Medium.ttf"),
- bold: require("./assets/fonts/Farsi/DemiBold.ttf"),
+ light : require("./assets/fonts/Farsi/Light.ttf"),
+ regular: require("./assets/fonts/Farsi/Regular.ttf"),
+ bold: require("./assets/fonts/Farsi/Medium.ttf"),
});
if (!fontsLoaded) {
diff --git a/navigation/index.js b/navigation/index.js
index fd97f91..6d8f6da 100644
--- a/navigation/index.js
+++ b/navigation/index.js
@@ -345,9 +345,9 @@ const HomeStackScreen = () => {
initialRouteName="Home"
>
-
-
-
+
+
+
);
@@ -356,7 +356,7 @@ const HomeStackScreen = () => {
const ProductsStack = createNativeStackNavigator();
const ProductsStackScreen = () => {
return (
-
+
@@ -380,7 +380,6 @@ const CARTStackScreen = () => {
-
);
}
@@ -420,6 +419,8 @@ const Navigation = ({ getStatus, isLogin }) => {
+
+
);
diff --git a/src/components/BottomSheetComponents/ProductReview.js b/src/components/BottomSheetComponents/ProductReview.js
index 3881d11..c60b3bd 100644
--- a/src/components/BottomSheetComponents/ProductReview.js
+++ b/src/components/BottomSheetComponents/ProductReview.js
@@ -50,6 +50,7 @@ const ProductReviews = ({ list }) => {
{question.images.map((image, index) => (
{
),
]}
>
-
+
{
+ const colorScheme = Appearance.getColorScheme();
return (
- {book.title}
+
+ {book.title}
+
);
};
diff --git a/src/screens/AR/index.js b/src/screens/AR/index.js
index 850f32f..0286276 100644
--- a/src/screens/AR/index.js
+++ b/src/screens/AR/index.js
@@ -6,6 +6,7 @@ import {
LayoutAnimation,
Platform,
Dimensions,
+ View
} from "react-native";
import { connect } from "react-redux";
import { publicApi } from "../../redux/actions";
@@ -14,6 +15,8 @@ import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer";
import Book from "./components/Book";
+import tw from "tailwind-rn";
+
const { height } = Dimensions.get("window");
function AR({ getArList, arList }) {
@@ -33,7 +36,6 @@ function AR({ getArList, arList }) {
style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative",
- // minHeight: height,
backgroundColor: "white",
}}
>
@@ -58,8 +60,10 @@ function AR({ getArList, arList }) {
}}
contentContainerStyle={{ paddingBottom: 100 }}
>
- {arList.length > 0 &&
- arList.map((book, index) => )}
+
+ {arList.length > 0 &&
+ arList.map((book, index) => )}
+
);
diff --git a/src/screens/Address/index.js b/src/screens/Address/index.js
index 4e80ab5..c94d978 100644
--- a/src/screens/Address/index.js
+++ b/src/screens/Address/index.js
@@ -27,6 +27,8 @@ import tw from "tailwind-rn";
import Colors from "../../constants/Colors";
import fontSize from "../../constants/fontSize";
+const ios = Platform.OS === "ios";
+
const Address = ({
city,
province,
@@ -181,7 +183,7 @@ const Address = ({
style={styles.container}
>
-
+ {/* */}
navigation.navigate("Product")}
+ onPress={() => {}}
>
+
navigation.navigate("Product")}
+ onPress={() =>
+ navigation.navigate("Product", { id: book?.id, type: "book" })
+ }
style={[
tw("rounded-md mx-1 overflow-hidden rounded-md"),
{
diff --git a/src/screens/Home/index.js b/src/screens/Home/index.js
index 4a5c036..0ed8ff5 100644
--- a/src/screens/Home/index.js
+++ b/src/screens/Home/index.js
@@ -20,8 +20,6 @@ import Blogs from "./components/Blogs";
import Drawer from "../../components/Drawer";
import Header from "./components/Header";
-// import { SafeAreaView } from 'react-native-safe-area-context';
-
// Within your render function
const Home = ({
blogs,
@@ -68,7 +66,7 @@ const Home = ({
{userProducts.length > 0 && }
@@ -77,7 +75,7 @@ const Home = ({
{books.length > 0 && }
{books.length > 0 && }
{blogs.length > 0 && }
-
+
);
};
@@ -85,12 +83,10 @@ const Home = ({
// Later on in your styles..
const styles = StyleSheet.create({
contentContainerStyle: {
- paddingBottom: 60,
+ paddingBottom: 20,
},
container: {
- width: Dimensions.get("window").width,
backgroundColor: "white",
- flexDirection: "column",
paddingVertical: 0,
paddingHorizontal: 0,
},
diff --git a/src/screens/OrderDetails/components/Book.js b/src/screens/OrderDetails/components/Book.js
index b763378..e8eda81 100644
--- a/src/screens/OrderDetails/components/Book.js
+++ b/src/screens/OrderDetails/components/Book.js
@@ -1,69 +1,110 @@
-import React from 'react';
-import {View, Text, Dimensions, Image} from 'react-native';
-import tw from 'tailwind-rn';
-import fontSize from '../../../constants/fontSize';
-import _ from 'lodash';
+import React from "react";
+import { View, Text, Dimensions, Image, Appearance } from "react-native";
-const width = Dimensions.get('window').width;
+//style
+import tw from "tailwind-rn";
+import fontSize from "../../../constants/fontSize";
+import Colors from "../../../constants/Colors";
-export default function Book({book}) {
+import _ from "lodash";
+
+const width = Dimensions.get("window").width;
+
+export default function Book({ book }) {
+ const colorScheme = Appearance.getColorScheme();
return (
-
+ tw("w-full flex flex-row-reverse justify-between py-3"),
+ {
+ borderBottomWidth: 1,
+ borderColor: Colors.theme1[colorScheme].grayE3,
+ },
+ ]}
+ >
+
-
+
+ {
+ fontSize: fontSize.base,
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "bold",
+ },
+ ]}
+ >
علوم اجتماعی
+ tw(" mt-2"),
+ {
+ fontSize: fontSize.sm,
+ color: Colors.theme1[colorScheme].gray20 + "aa",
+ fontFamily: "regular",
+ },
+ ]}
+ >
پایه دوم
+ tw(" mt-1"),
+ {
+ fontSize: fontSize.sm,
+ color: Colors.theme1[colorScheme].greenBA,
+ fontFamily: "regular",
+ },
+ ]}
+ >
نسخه دیجیتال
-
+
+ ]}
+ >
1
-
- 126.000 تومان
-
+
+
+ تومان
+
+
+ 126.000
+
+
);
diff --git a/src/screens/OrderDetails/index.js b/src/screens/OrderDetails/index.js
index 0e14745..773a561 100644
--- a/src/screens/OrderDetails/index.js
+++ b/src/screens/OrderDetails/index.js
@@ -9,15 +9,23 @@ import {
Platform,
StatusBar,
LayoutAnimation,
+ Appearance,
} from "react-native";
+import { connect } from "react-redux";
+import _ from "lodash";
+
+//components
import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer";
import Book from "./components/Book";
-import { connect } from "react-redux";
+
+//style
import tw from "tailwind-rn";
import fontSize from "../../constants/fontSize";
+import Colors from "../../constants/Colors";
+
+//assets
import b1Image from "./assets/b1.png";
-import _ from "lodash";
const width = Dimensions.get("window").width;
@@ -36,6 +44,7 @@ const status = {
};
function OrderDetails({ order }) {
+ const colorScheme = Appearance.getColorScheme();
const [position, setPosition] = useState("100%");
const setBoxPosition = () => {
@@ -57,7 +66,7 @@ function OrderDetails({ order }) {
hamburgerMenu: false,
title: "",
bookmark: false,
- qr: true,
+ qr: false,
back: true,
}}
/>
@@ -69,15 +78,15 @@ function OrderDetails({ order }) {
@@ -86,7 +95,11 @@ function OrderDetails({ order }) {
{status[order.status]}
@@ -102,12 +115,19 @@ function OrderDetails({ order }) {
آدرس تحویل:
@@ -118,8 +138,8 @@ function OrderDetails({ order }) {
{
fontSize: fontSize.sm,
lineHeight: 17,
- color: "#05335F",
- fontFamily: "light",
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
},
]}
>
@@ -129,13 +149,20 @@ function OrderDetails({ order }) {
مشخصات تحویل گیرنده:
@@ -146,8 +173,8 @@ function OrderDetails({ order }) {
{
fontSize: fontSize.sm,
lineHeight: 17,
- color: "#05335F",
- fontFamily: "light",
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
},
]}
>
@@ -157,7 +184,11 @@ function OrderDetails({ order }) {
شماره موبایل:
@@ -168,8 +199,8 @@ function OrderDetails({ order }) {
{
fontSize: fontSize.sm,
lineHeight: 17,
- color: "#05335F",
- fontFamily: "light",
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
},
]}
>
@@ -180,12 +211,16 @@ function OrderDetails({ order }) {
{_.join(["کد تحویل", order.receiveCode], " ")}
@@ -195,8 +230,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mt-1"),
{
fontSize: fontSize.sm,
- color: "#05335F",
- fontFamily: "light",
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
},
]}
>
@@ -212,7 +247,11 @@ function OrderDetails({ order }) {
مبلغ سبد خرید:
@@ -222,8 +261,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
- color: "#05335F",
- fontFamily: "light",
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
},
]}
>
@@ -233,7 +272,11 @@ function OrderDetails({ order }) {
تخفیف:
@@ -243,8 +286,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
- color: "#05335F",
- fontFamily: "light",
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
},
]}
>
@@ -255,13 +298,20 @@ function OrderDetails({ order }) {
هزینه ارسال کالا:
@@ -271,8 +321,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
- color: "#05335F",
- fontFamily: "light",
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
},
]}
>
@@ -282,7 +332,11 @@ function OrderDetails({ order }) {
جمع هزینه پرداختی:
@@ -292,8 +346,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
- color: "#05335F",
- fontFamily: "light",
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
},
]}
>
@@ -304,13 +358,20 @@ function OrderDetails({ order }) {
نحوه پرداخت:
@@ -320,8 +381,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
- color: "#05335F",
- fontFamily: "light",
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
},
]}
>
@@ -331,7 +392,11 @@ function OrderDetails({ order }) {
شماره تراکنش:
@@ -341,8 +406,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
- color: "#05335F",
- fontFamily: "light",
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
},
]}
>
@@ -354,7 +419,11 @@ function OrderDetails({ order }) {
تاریخ تحویل:
@@ -364,8 +433,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
- color: "#05335F",
- fontFamily: "light",
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
},
]}
>
@@ -387,8 +456,8 @@ const styles = StyleSheet.create({
width: width,
backgroundColor: "white",
flexDirection: "column",
- paddingVertical: 5,
- paddingHorizontal: 10,
+ paddingVertical: 0,
+ paddingHorizontal: 16,
},
});
diff --git a/src/screens/OrdersFollowUp/assets/leftArrow.png b/src/screens/OrdersFollowUp/assets/leftArrow.png
deleted file mode 100644
index 1108ed5..0000000
Binary files a/src/screens/OrdersFollowUp/assets/leftArrow.png and /dev/null differ
diff --git a/src/screens/OrdersFollowUp/components/Order.js b/src/screens/OrdersFollowUp/components/Order.js
index 459387f..99ec937 100644
--- a/src/screens/OrdersFollowUp/components/Order.js
+++ b/src/screens/OrdersFollowUp/components/Order.js
@@ -1,141 +1,192 @@
-import React from 'react';
+import React from "react";
import {
View,
Text,
Dimensions,
StyleSheet,
Image,
- TouchableOpacity
-} from 'react-native';
-import { useNavigation } from '@react-navigation/native';
-import tw from 'tailwind-rn';
-import fontSize from '../../../constants/fontSize';
-import leftArrowIcon from '../assets/leftArrow.png';
-import _ from 'lodash';
+ TouchableOpacity,
+ Appearance,
+} from "react-native";
+import { useNavigation } from "@react-navigation/native";
+import Svg, { Path } from "react-native-svg"
+import _ from "lodash";
-const width = Dimensions.get('window').width;
+//style
+import tw from "tailwind-rn";
+import fontSize from "../../../constants/fontSize";
+import Colors from "../../../constants/Colors";
+
+const width = Dimensions.get("window").width;
const colors = {
- 1: '#FFF700',
- 4: '#FF0000',
- 3: '#4CFF00',
- 2: '#196EC0',
+ 1: "#FFF700",
+ 4: "#FF0000",
+ 3: "#4CFF00",
+ 2: "#196EC0",
};
const status = {
- 1: 'در حال پردازش',
- 4: 'درخواست رد شد',
- 3: 'تکمیل شد',
- 2: 'ارسال شده',
+ 1: "در حال پردازش",
+ 4: "درخواست رد شد",
+ 3: "تکمیل شد",
+ 2: "ارسال شده",
};
-function Order({order}) {
+function Order({ order }) {
+ const colorScheme = Appearance.getColorScheme();
const navigation = useNavigation();
return (
+ tw("w-full flex flex-col rounded-md overflow-hidden my-3"),
+ {
+ borderWidth: 1,
+ borderColor: Colors.theme1[colorScheme].greenCF + "22",
+ },
+ ]}
+ >
+ tw("flex flex-row-reverse w-full justify-between items-center p-3"),
+ { backgroundColor: Colors.theme1[colorScheme].greenCF + "1a" },
+ ]}
+ >
- {_.join(['شماره سفارش:', order.number], ' ')}
+ tw("font-medium"),
+ {
+ fontSize: fontSize.base,
+ color: Colors.theme1[colorScheme].green79,
+ fontFamily: "regular",
+ },
+ ]}
+ >
+ {_.join(["شماره سفارش:", order.number], " ")}
-
+
+ tw("font-light"),
+ {
+ color: Colors.theme1[colorScheme].green79,
+ fontSize: fontSize.sm,
+ fontFamily: "bold",
+ },
+ ]}
+ >
{status[order.status]}
+ tw("h-4 w-4 rounded-full mr-2"),
+ { backgroundColor: colors[order.status] },
+ ]}
+ >
-
-
-
+
+
+
{order.items.length < 2
- ? order?.items?.map(item => (
+ ? order?.items?.map((item, index) => (
))
: order.items
?.slice(0, 1)
- ?.map(item => (
+ ?.map((item, index) => (
))}
-
-
+
- {_.join(['کد تحویل:', order.receiveCode], ' ')}
+ ]}
+ >
+ {_.join(["کد تحویل:", order.receiveCode], " ")}
-
+
- {_.join(['جمع فاکتور:', order.cost], ' ')}
+ tw("my-3"),
+ {
+ fontSize: fontSize.tiny,
+ color: Colors.theme1[colorScheme].gray20,
+ fontFamily: "bold",
+ },
+ ]}
+ >
+ {_.join(["جمع فاکتور:", order.cost], " ")}
navigation.navigate('Order')}
+ onPress={() => navigation.navigate("Order")}
style={[
- tw('rounded-md flex flex-row-reverse justify-center px-5 py-2'),
- {borderWidth: 1, borderColor: '#1999C0'},
- ]}>
-
+ tw("rounded-md flex flex-row-reverse justify-center px-5 py-2"),
+ {
+ borderWidth: 1,
+ borderColor: Colors.theme1[colorScheme].greenCF,
+ },
+ ]}
+ >
+
جزئیات سفارش
-
+
- {_.join(['تاریخ سفارش:', order.date], ' ')}
+ tw("my-5"),
+ {
+ fontSize: fontSize.sm,
+ color: Colors.theme1[colorScheme].gray20,
+ fontFamily: "light",
+ },
+ ]}
+ >
+ {_.join(["تاریخ سفارش:", order.date], " ")}
@@ -146,12 +197,12 @@ function Order({order}) {
const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 50,
- alignItems: 'flex-end',
+ alignItems: "flex-end",
},
container: {
width: width,
- backgroundColor: 'white',
- flexDirection: 'column',
+ backgroundColor: "white",
+ flexDirection: "column",
paddingVertical: 5,
paddingHorizontal: 10,
},
diff --git a/src/screens/OrdersFollowUp/index.js b/src/screens/OrdersFollowUp/index.js
index 1b5b919..f072870 100644
--- a/src/screens/OrdersFollowUp/index.js
+++ b/src/screens/OrdersFollowUp/index.js
@@ -63,8 +63,8 @@ const styles = StyleSheet.create({
width: width,
backgroundColor: "white",
flexDirection: "column",
- paddingVertical: 5,
- paddingHorizontal: 10,
+ paddingVertical: 0,
+ paddingHorizontal: 16,
},
});
diff --git a/src/screens/OrdersFollowUp/left.svg b/src/screens/OrdersFollowUp/left.svg
new file mode 100644
index 0000000..744ff08
--- /dev/null
+++ b/src/screens/OrdersFollowUp/left.svg
@@ -0,0 +1,8 @@
+
diff --git a/src/screens/Products/components/Main.js b/src/screens/Products/components/Main.js
index 14d8fc2..2be56db 100644
--- a/src/screens/Products/components/Main.js
+++ b/src/screens/Products/components/Main.js
@@ -72,7 +72,7 @@ const Main = ({ books, filterOptions, grades }) => {
? bySearchFilter?.map((product, index) => (
navigation.navigate("Product")}
>
diff --git a/src/screens/Profile/components/List.js b/src/screens/Profile/components/List.js
index e505d51..b786c6a 100644
--- a/src/screens/Profile/components/List.js
+++ b/src/screens/Profile/components/List.js
@@ -9,6 +9,7 @@ import {
import React from "react";
import { connect } from "react-redux";
import Svg, { Path, G } from "react-native-svg";
+import { useNavigation } from "@react-navigation/native";
//style
import tw from "tailwind-rn";
@@ -18,6 +19,7 @@ import Colors from "../../../constants/Colors";
const ios = Platform.OS === "ios";
const List = ({}) => {
+ const navigation = useNavigation();
const colorScheme = Appearance.getColorScheme();
const [dropdown, setDropdown] = React.useState(true);
const pages = [
@@ -44,6 +46,7 @@ const List = ({}) => {
),
name: "اطلاعات حساب کاربری",
+ onPress: () => navigation.push("CreateAddress", { type: "profile" }),
},
{
icon: (
@@ -77,6 +80,7 @@ const List = ({}) => {
),
name: "سفارشات",
+ onPress: () => navigation.push("Orders"),
},
{
icon: (
@@ -101,6 +105,7 @@ const List = ({}) => {
),
name: "کتابهای من",
+ onPress: () => navigation.push("AR"),
},
{
icon: (
@@ -128,6 +133,7 @@ const List = ({}) => {
),
name: "دورههای من",
+ onPress: () => {},
},
{
icon: (
@@ -152,6 +158,7 @@ const List = ({}) => {
),
name: "لیست علاقهمندیها",
+ onPress: () => {},
},
{
icon: (
@@ -185,6 +192,7 @@ const List = ({}) => {
),
name: "آدرسها",
+ onPress: () => {},
},
];
return (
@@ -194,25 +202,24 @@ const List = ({}) => {
key={index}
style={[
tw(
- `w-full flex items-center justify-between mb-4 pb-4 ${
- ios ? "flex-row-reverse" : "flex-row"
- }`
+ `w-full flex items-center justify-between mb-4 pb-4 flex-row-reverse`
),
{
borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3 + "aa",
},
]}
+ onPress={() => page.onPress()}
>
{page.icon}
{
{page.name}
-