|
|
|
@ -87,21 +87,30 @@ function Book({ |
|
|
|
|
if (whichTypeAdded === "video" && videoAvailabileInCart) { |
|
|
|
|
asyncAwesomeAlert("", "به سبد خرید اضافه شد", { |
|
|
|
|
showCancelButton: true, |
|
|
|
|
onConfirm: () => navigation.push("ShoppingCart"), |
|
|
|
|
onConfirm: () => |
|
|
|
|
navigation.navigate("ShoppingCartTab", { |
|
|
|
|
screen: "ShoppingCart", |
|
|
|
|
}), |
|
|
|
|
confirmText: "مشاهده سبد خرید", |
|
|
|
|
cancelText: "ادامه خرید", |
|
|
|
|
}); |
|
|
|
|
} else if (whichTypeAdded === "physical" && physicalAvailabileInCart) { |
|
|
|
|
asyncAwesomeAlert("", "به سبد خرید اضافه شد", { |
|
|
|
|
showCancelButton: true, |
|
|
|
|
onConfirm: () => navigation.push("ShoppingCart"), |
|
|
|
|
onConfirm: () => |
|
|
|
|
navigation.navigate("ShoppingCartTab", { |
|
|
|
|
screen: "ShoppingCart", |
|
|
|
|
}), |
|
|
|
|
confirmText: "مشاهده سبد خرید", |
|
|
|
|
cancelText: "ادامه خرید", |
|
|
|
|
}); |
|
|
|
|
} else if (whichTypeAdded === "digital" && digitalAvailabileInCart) { |
|
|
|
|
asyncAwesomeAlert("", "به سبد خرید اضافه شد", { |
|
|
|
|
showCancelButton: true, |
|
|
|
|
onConfirm: () => navigation.push("ShoppingCart"), |
|
|
|
|
onConfirm: () => |
|
|
|
|
navigation.navigate("ShoppingCartTab", { |
|
|
|
|
screen: "ShoppingCart", |
|
|
|
|
}), |
|
|
|
|
confirmText: "مشاهده سبد خرید", |
|
|
|
|
cancelText: "ادامه خرید", |
|
|
|
|
}); |
|
|
|
@ -271,7 +280,8 @@ function Book({ |
|
|
|
|
{ |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: Colors.theme1.greenCF, |
|
|
|
|
backgroundColor: theme === 'light' ? Colors.theme1.greenFF + "0a" : null, |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.greenFF + "0a" : null, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
onPress={() => |
|
|
|
@ -340,8 +350,9 @@ function Book({ |
|
|
|
|
tw("flex flex-row-reverse justify-between px-2 py-3 mb-4"), |
|
|
|
|
{ |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: Colors.theme1.greenCF, |
|
|
|
|
backgroundColor: theme === 'light' ? Colors.theme1.greenFF + "0a" : null, |
|
|
|
|
borderColor: Colors.theme1.greenCF, |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.greenFF + "0a" : null, |
|
|
|
|
width: width - 32 - 8 - (fontSize.sm * 6 + 18), |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -411,7 +422,8 @@ function Book({ |
|
|
|
|
{ |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: Colors.theme1.greenCF, |
|
|
|
|
backgroundColor: theme === 'light' ? Colors.theme1.greenFF + "0a" : null, |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.greenFF + "0a" : null, |
|
|
|
|
width: fontSize.sm * 6 + 18, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -422,7 +434,9 @@ function Book({ |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
fontSize: fontSize.xs, |
|
|
|
|
color: |
|
|
|
|
theme === "light" ? Colors.theme1.green79 : Colors.theme1.greenCF, |
|
|
|
|
theme === "light" |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.greenCF, |
|
|
|
|
|
|
|
|
|
paddingVertical: 4, |
|
|
|
|
}} |
|
|
|
@ -437,7 +451,8 @@ function Book({ |
|
|
|
|
{ |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: Colors.theme1.greenCF, |
|
|
|
|
backgroundColor: theme === 'light' ? Colors.theme1.greenFF + "0a" : null, |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.greenFF + "0a" : null, |
|
|
|
|
width: width - 32 - 8 - (fontSize.sm * 6 + 18), |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -506,7 +521,8 @@ function Book({ |
|
|
|
|
{ |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: Colors.theme1.greenCF, |
|
|
|
|
backgroundColor: theme === 'light' ? Colors.theme1.greenFF + "0a" : null, |
|
|
|
|
backgroundColor: |
|
|
|
|
theme === "light" ? Colors.theme1.greenFF + "0a" : null, |
|
|
|
|
width: fontSize.sm * 6 + 18, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -517,7 +533,9 @@ function Book({ |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
fontSize: fontSize.xs, |
|
|
|
|
color: |
|
|
|
|
theme === "light" ? Colors.theme1.green79 : Colors.theme1.greenCF, |
|
|
|
|
theme === "light" |
|
|
|
|
? Colors.theme1.green79 |
|
|
|
|
: Colors.theme1.greenCF, |
|
|
|
|
|
|
|
|
|
paddingVertical: 4, |
|
|
|
|
}} |
|
|
|
@ -567,7 +585,7 @@ function Book({ |
|
|
|
|
style={[ |
|
|
|
|
{ |
|
|
|
|
fontSize: fontSize.tiny, |
|
|
|
|
color: theme === 'light' ? "#275077" : Colors.theme1.white, |
|
|
|
|
color: theme === "light" ? "#275077" : Colors.theme1.white, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}, |
|
|
|
|
tw(""), |
|
|
|
|