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