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