|
|
@ -51,9 +51,7 @@ function Product({ product, grades, pushToCart, loading, mobile }) { |
|
|
|
]} |
|
|
|
]} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<View |
|
|
|
<View |
|
|
|
style={tw( |
|
|
|
style={tw(`flex ${ios ? "items-start pl-3" : "items-end pr-2"}`)} |
|
|
|
`flex ${ios ? "items-start pl-3" : "items-end pr-2"}` |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<Text |
|
|
|
<Text |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
@ -63,7 +61,7 @@ function Product({ product, grades, pushToCart, loading, mobile }) { |
|
|
|
fontFamily: "bold", |
|
|
|
fontFamily: "bold", |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
{product.product.book.name} |
|
|
|
{product?.product?.book?.name || " "} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
<Text |
|
|
|
<Text |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
@ -73,7 +71,7 @@ function Product({ product, grades, pushToCart, loading, mobile }) { |
|
|
|
fontFamily: "regular", |
|
|
|
fontFamily: "regular", |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
{"پایه" + " " + grades[product.product.book.gradeId]} |
|
|
|
{"پایه" + " " + grades[product?.product?.book?.gradeId] || " "} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
<Text |
|
|
|
<Text |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
@ -82,7 +80,7 @@ function Product({ product, grades, pushToCart, loading, mobile }) { |
|
|
|
fontFamily: "regular", |
|
|
|
fontFamily: "regular", |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
{product.productType === 2 ? "نسخه فیزیکی" : "نسخه دیجیتال"} |
|
|
|
{product?.productType || 1 === 2 ? "نسخه فیزیکی" : "نسخه دیجیتال"} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
<View |
|
|
|
<View |
|
|
|
style={tw( |
|
|
|
style={tw( |
|
|
@ -109,15 +107,13 @@ function Product({ product, grades, pushToCart, loading, mobile }) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
> |
|
|
|
> |
|
|
|
{separate(product?.product?.price)} |
|
|
|
{separate(product?.product?.price) || ' '} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View |
|
|
|
<View |
|
|
|
style={tw( |
|
|
|
style={tw(`flex justify-between ${ios ? "items-end" : "items-start"}`)} |
|
|
|
`flex justify-between ${ios ? "items-end" : "items-start"}` |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<AntDesign |
|
|
|
<AntDesign |
|
|
|
name="close" |
|
|
|
name="close" |
|
|
@ -151,7 +147,9 @@ function Product({ product, grades, pushToCart, loading, mobile }) { |
|
|
|
} |
|
|
|
} |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw( |
|
|
|
tw( |
|
|
|
`rounded-md py-0 flex flex-row justify-center items-center border ${mobile ? 'px-2' : "px-3"}` |
|
|
|
`rounded-md py-0 flex flex-row justify-center items-center border ${ |
|
|
|
|
|
|
|
mobile ? "px-2" : "px-3" |
|
|
|
|
|
|
|
}` |
|
|
|
), |
|
|
|
), |
|
|
|
{ |
|
|
|
{ |
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
@ -199,7 +197,9 @@ function Product({ product, grades, pushToCart, loading, mobile }) { |
|
|
|
} |
|
|
|
} |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw( |
|
|
|
tw( |
|
|
|
`rounded-md py-0 flex flex-row justify-center items-center border ${mobile ? 'px-2.5' : 'px-3.5'}` |
|
|
|
`rounded-md py-0 flex flex-row justify-center items-center border ${ |
|
|
|
|
|
|
|
mobile ? "px-2.5" : "px-3.5" |
|
|
|
|
|
|
|
}` |
|
|
|
), |
|
|
|
), |
|
|
|
{ |
|
|
|
{ |
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
@ -217,12 +217,25 @@ function Product({ product, grades, pushToCart, loading, mobile }) { |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</Pressable> |
|
|
|
</Pressable> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={tw(`flex items-center justify-center ${ios ? "flex-row-reverse" : "flex-row"}`)}> |
|
|
|
<View |
|
|
|
|
|
|
|
style={tw( |
|
|
|
|
|
|
|
`flex items-center justify-center ${ |
|
|
|
|
|
|
|
ios ? "flex-row-reverse" : "flex-row" |
|
|
|
|
|
|
|
}` |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
> |
|
|
|
<Text style={[{ fontSize: fontSize.sm, fontFamily: "regular" }]}> |
|
|
|
<Text style={[{ fontSize: fontSize.sm, fontFamily: "regular" }]}> |
|
|
|
{" " + "تومان"} |
|
|
|
{" " + "تومان"} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
<Text style={[{ fontSize: mobile ? fontSize.xl : fontSize.xl4, fontFamily: "regular" }]}> |
|
|
|
<Text |
|
|
|
{separate(product.product.price * product.count)} |
|
|
|
style={[ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fontSize: mobile ? fontSize.xl : fontSize.xl4, |
|
|
|
|
|
|
|
fontFamily: "regular", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
]} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{separate(product?.product?.price * product?.count) || ' '} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|