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