|
|
|
@ -88,8 +88,8 @@ function Book({ |
|
|
|
|
asyncAwesomeAlert("", "به سبد خرید اضافه شد", { |
|
|
|
|
showCancelButton: true, |
|
|
|
|
onConfirm: () => |
|
|
|
|
navigation.navigate("ShoppingCartTab", { |
|
|
|
|
screen: "ShoppingCart", |
|
|
|
|
navigation.navigate("Root", { |
|
|
|
|
screen: "ShoppingCartTab", |
|
|
|
|
}), |
|
|
|
|
confirmText: "مشاهده سبد خرید", |
|
|
|
|
cancelText: "ادامه خرید", |
|
|
|
@ -98,8 +98,8 @@ function Book({ |
|
|
|
|
asyncAwesomeAlert("", "به سبد خرید اضافه شد", { |
|
|
|
|
showCancelButton: true, |
|
|
|
|
onConfirm: () => |
|
|
|
|
navigation.navigate("ShoppingCartTab", { |
|
|
|
|
screen: "ShoppingCart", |
|
|
|
|
navigation.navigate("Root", { |
|
|
|
|
screen: "ShoppingCartTab", |
|
|
|
|
}), |
|
|
|
|
confirmText: "مشاهده سبد خرید", |
|
|
|
|
cancelText: "ادامه خرید", |
|
|
|
@ -108,8 +108,8 @@ function Book({ |
|
|
|
|
asyncAwesomeAlert("", "به سبد خرید اضافه شد", { |
|
|
|
|
showCancelButton: true, |
|
|
|
|
onConfirm: () => |
|
|
|
|
navigation.navigate("ShoppingCartTab", { |
|
|
|
|
screen: "ShoppingCart", |
|
|
|
|
navigation.navigate("Root", { |
|
|
|
|
screen: "ShoppingCartTab", |
|
|
|
|
}), |
|
|
|
|
confirmText: "مشاهده سبد خرید", |
|
|
|
|
cancelText: "ادامه خرید", |
|
|
|
@ -123,21 +123,6 @@ function Book({ |
|
|
|
|
return ( |
|
|
|
|
<ScrollView style={[tw("flex flex-1 relative")]}> |
|
|
|
|
{!mobile ? <View style={tw("mt-5")}></View> : null} |
|
|
|
|
{!book ? ( |
|
|
|
|
<View |
|
|
|
|
style={[ |
|
|
|
|
tw("absolute left-0 top-0 rounded-md overflow-hidden"), |
|
|
|
|
{ |
|
|
|
|
width: Dimensions.get("window").width, |
|
|
|
|
height: height - 110, |
|
|
|
|
zIndex: 1, |
|
|
|
|
backgroundColor: Colors.theme1.white + "60", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
|
<Blur /> |
|
|
|
|
</View> |
|
|
|
|
) : null} |
|
|
|
|
{imageSlider ? <ImageSlider /> : null} |
|
|
|
|
<View style={[tw("flex flex-row-reverse")]}> |
|
|
|
|
<Image |
|
|
|
@ -170,7 +155,7 @@ function Book({ |
|
|
|
|
textAlign: ios ? "right" : "auto", |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
{book?.name} |
|
|
|
|
{book?.name || ""} |
|
|
|
|
</Text> |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
@ -182,7 +167,7 @@ function Book({ |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
{"پایه" + " " + grades[book?.gradeId]} |
|
|
|
|
{"پایه" + " " + (grades[book?.gradeId] || " ")} |
|
|
|
|
</Text> |
|
|
|
|
</View> |
|
|
|
|
<Text |
|
|
|
@ -191,7 +176,7 @@ function Book({ |
|
|
|
|
{ color: "#323232", fontSize: fontSize.sm, fontFamily: "light" }, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
|
{book?.text} |
|
|
|
|
{book?.text || " "} |
|
|
|
|
</Text> |
|
|
|
|
</View> |
|
|
|
|
</View> |
|
|
|
@ -209,7 +194,7 @@ function Book({ |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
{" "} |
|
|
|
|
{book?.pagesNum + "\n" + "صفحه"} |
|
|
|
|
{(book?.pagesNum || " ") + "\n" + "صفحه"} |
|
|
|
|
</Text> |
|
|
|
|
</View> |
|
|
|
|
<View |
|
|
|
@ -291,7 +276,10 @@ function Book({ |
|
|
|
|
"این محصول قبلا به سبد خرید شما اضافه شده است.", |
|
|
|
|
{ |
|
|
|
|
showCancelButton: true, |
|
|
|
|
onConfirm: () => navigation.push("ShoppingCart"), |
|
|
|
|
onConfirm: () => |
|
|
|
|
navigation.navigate("Root", { |
|
|
|
|
screen: "ShoppingCartTab", |
|
|
|
|
}), |
|
|
|
|
confirmText: "مشاهده سبد خرید", |
|
|
|
|
cancelText: "باشه", |
|
|
|
|
} |
|
|
|
@ -338,7 +326,7 @@ function Book({ |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
|
{separate(book?.product[1]?.price) + " " + "تومان"} |
|
|
|
|
{(separate(book?.product[1]?.price) || " ") + " " + "تومان"} |
|
|
|
|
</Text> |
|
|
|
|
</View> |
|
|
|
|
</View> |
|
|
|
@ -363,7 +351,10 @@ function Book({ |
|
|
|
|
"این محصول قبلا به سبد خرید شما اضافه شده است.", |
|
|
|
|
{ |
|
|
|
|
showCancelButton: true, |
|
|
|
|
onConfirm: () => navigation.push("ShoppingCart"), |
|
|
|
|
onConfirm: () => |
|
|
|
|
navigation.navigate("Root", { |
|
|
|
|
screen: "ShoppingCartTab", |
|
|
|
|
}), |
|
|
|
|
confirmText: "مشاهده سبد خرید", |
|
|
|
|
cancelText: "باشه", |
|
|
|
|
} |
|
|
|
@ -410,7 +401,7 @@ function Book({ |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
|
{separate(book?.product[0]?.price) + " " + "تومان"} |
|
|
|
|
{(separate(book?.product[0]?.price) || " ") + " " + "تومان"} |
|
|
|
|
</Text> |
|
|
|
|
</View> |
|
|
|
|
</> |
|
|
|
@ -463,7 +454,10 @@ function Book({ |
|
|
|
|
"این محصول قبلا به سبد خرید شما اضافه شده است.", |
|
|
|
|
{ |
|
|
|
|
showCancelButton: true, |
|
|
|
|
onConfirm: () => navigation.push("ShoppingCart"), |
|
|
|
|
onConfirm: () => |
|
|
|
|
navigation.navigate("Root", { |
|
|
|
|
screen: "ShoppingCartTab", |
|
|
|
|
}), |
|
|
|
|
confirmText: "مشاهده سبد خرید", |
|
|
|
|
cancelText: "باشه", |
|
|
|
|
} |
|
|
|
@ -509,7 +503,7 @@ function Book({ |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
|
{separate(book?.product[2]?.price) + " " + "تومان"} |
|
|
|
|
{(separate(book?.product[2]?.price) || " ") + " " + "تومان"} |
|
|
|
|
</Text> |
|
|
|
|
</View> |
|
|
|
|
</> |
|
|
|
|