|
|
|
@ -5,6 +5,7 @@ import { |
|
|
|
|
Image, |
|
|
|
|
Dimensions, |
|
|
|
|
Appearance, |
|
|
|
|
Platform, |
|
|
|
|
} from "react-native"; |
|
|
|
|
import React from "react"; |
|
|
|
|
import { connect } from "react-redux"; |
|
|
|
@ -17,6 +18,7 @@ import Colors from "../../../constants/Colors"; |
|
|
|
|
import fontSize from "../../../constants/fontSize"; |
|
|
|
|
|
|
|
|
|
const width = Dimensions.get("window").width; |
|
|
|
|
const ios = Platform.OS === "ios"; |
|
|
|
|
|
|
|
|
|
const Main = ({ books, filterOptions, grades }) => { |
|
|
|
|
const colorScheme = Appearance.getColorScheme(); |
|
|
|
@ -90,15 +92,35 @@ const Main = ({ books, filterOptions, grades }) => { |
|
|
|
|
<Text |
|
|
|
|
style={[ |
|
|
|
|
tw("mb-1"), |
|
|
|
|
{ fontFamily: "bold", fontSize: fontSize.xl2, color : Colors.theme1[colorScheme].gray20 }, |
|
|
|
|
{ |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
fontSize: fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].gray20, |
|
|
|
|
textAlign: ios ? "right" : "auto", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
|
{'دوره ویدئویی' + ' ' + product?.name} |
|
|
|
|
{"دوره ویدئویی" + " " + product?.name} |
|
|
|
|
</Text> |
|
|
|
|
<Text style={[tw("mb-4"), { fontSize: fontSize.tiny, fontFamily : 'regular', color : Colors.theme1[colorScheme].greenBA }]}> |
|
|
|
|
<Text |
|
|
|
|
style={[ |
|
|
|
|
tw("mb-4"), |
|
|
|
|
{ |
|
|
|
|
fontSize: fontSize.tiny, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
color: Colors.theme1[colorScheme].greenBA, |
|
|
|
|
textAlign: ios ? "right" : "auto", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
|
{"پایه" + " " + grades[product?.gradeId]} |
|
|
|
|
</Text> |
|
|
|
|
<Text style={[tw("w-full flex flex-row text-left"), {fontSize : fontSize.xl, fontFamily : 'bold'}]}> |
|
|
|
|
<Text |
|
|
|
|
style={[ |
|
|
|
|
tw("w-full flex flex-row text-left"), |
|
|
|
|
{ fontSize: fontSize.xl, fontFamily: "bold" }, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
|
{separate(product?.product[2]?.price) + " " + "تومان"} |
|
|
|
|
</Text> |
|
|
|
|
</Pressable> |
|
|
|
@ -120,7 +142,10 @@ const Main = ({ books, filterOptions, grades }) => { |
|
|
|
|
tw("flex justify-between px-2 pt-2 rounded-md"), |
|
|
|
|
]} |
|
|
|
|
onPress={() => |
|
|
|
|
navigation.navigate("Product", { id: product?.id, type: "book" }) |
|
|
|
|
navigation.navigate("Product", { |
|
|
|
|
id: product?.id, |
|
|
|
|
type: "book", |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
> |
|
|
|
|
<View style={tw("w-full flex")}> |
|
|
|
@ -135,11 +160,12 @@ const Main = ({ books, filterOptions, grades }) => { |
|
|
|
|
/> |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
fontSize: fontSize.lg, |
|
|
|
|
fontSize: fontSize.base, |
|
|
|
|
marginTop: 5, |
|
|
|
|
color: "#05335F", |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
width: "100%", |
|
|
|
|
textAlign: ios ? "right" : "auto", |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
{"کتاب دیجیتال" + " " + product?.name} |
|
|
|
@ -151,6 +177,7 @@ const Main = ({ books, filterOptions, grades }) => { |
|
|
|
|
marginTop: 5, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
width: "100%", |
|
|
|
|
textAlign: ios ? "right" : "auto", |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
{"پایه" + " " + grades[product?.gradeId]} |
|
|
|
@ -176,7 +203,7 @@ const Main = ({ books, filterOptions, grades }) => { |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
fontSize: fontSize.sm, |
|
|
|
|
color: Colors.theme1[colorScheme].grayCC, |
|
|
|
|
color: Colors.theme1[colorScheme].gray2077, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
@ -200,7 +227,10 @@ const Main = ({ books, filterOptions, grades }) => { |
|
|
|
|
tw("flex justify-between px-2 pt-2 rounded-md"), |
|
|
|
|
]} |
|
|
|
|
onPress={() => |
|
|
|
|
navigation.navigate("Product", { id: product?.id, type: "book" }) |
|
|
|
|
navigation.navigate("Product", { |
|
|
|
|
id: product?.id, |
|
|
|
|
type: "book", |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
> |
|
|
|
|
<View style={tw("w-full flex")}> |
|
|
|
@ -215,11 +245,12 @@ const Main = ({ books, filterOptions, grades }) => { |
|
|
|
|
/> |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
fontSize: fontSize.lg, |
|
|
|
|
fontSize: fontSize.base, |
|
|
|
|
marginTop: 5, |
|
|
|
|
color: "#05335F", |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
width: "100%", |
|
|
|
|
textAlign: ios ? "right" : "auto", |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
{"کتاب فیزیکی" + " " + product?.name} |
|
|
|
@ -231,6 +262,7 @@ const Main = ({ books, filterOptions, grades }) => { |
|
|
|
|
marginTop: 5, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
width: "100%", |
|
|
|
|
textAlign: ios ? "right" : "auto", |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
{"پایه" + " " + grades[product?.gradeId]} |
|
|
|
@ -256,7 +288,7 @@ const Main = ({ books, filterOptions, grades }) => { |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
fontSize: fontSize.sm, |
|
|
|
|
color: Colors.theme1[colorScheme].grayCC, |
|
|
|
|
color: Colors.theme1[colorScheme].gray2077, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
@ -271,9 +303,11 @@ const Main = ({ books, filterOptions, grades }) => { |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<View |
|
|
|
|
style={[tw( |
|
|
|
|
"flex w-full px-4 flex-row flex-wrap justify-between bg-white pb-20" |
|
|
|
|
)]} |
|
|
|
|
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)} |
|
|
|
|