|
|
@ -4,12 +4,12 @@ import { |
|
|
|
Text, |
|
|
|
Text, |
|
|
|
Image, |
|
|
|
Image, |
|
|
|
ScrollView, |
|
|
|
ScrollView, |
|
|
|
TouchableOpacity, |
|
|
|
TouchableHighlight, |
|
|
|
Dimensions, |
|
|
|
Dimensions, |
|
|
|
Appearance, |
|
|
|
Appearance, |
|
|
|
Pressable, |
|
|
|
Pressable, |
|
|
|
Platform, |
|
|
|
Platform, |
|
|
|
ActivityIndicator |
|
|
|
ActivityIndicator, |
|
|
|
} from "react-native"; |
|
|
|
} from "react-native"; |
|
|
|
import { useNavigation } from "@react-navigation/native"; |
|
|
|
import { useNavigation } from "@react-navigation/native"; |
|
|
|
import { product, userProduct } from "../../../redux/actions"; |
|
|
|
import { product, userProduct } from "../../../redux/actions"; |
|
|
@ -85,12 +85,13 @@ function Book({ |
|
|
|
</Pressable> |
|
|
|
</Pressable> |
|
|
|
)} |
|
|
|
)} |
|
|
|
{imageSlider && <ImageSlider />} |
|
|
|
{imageSlider && <ImageSlider />} |
|
|
|
<View style={tw("flex flex-row-reverse")}> |
|
|
|
<View style={[tw("flex flex-row-reverse")]}> |
|
|
|
<Image |
|
|
|
<Image |
|
|
|
source={{ uri: `https://dnvn.ir/api/v1/file/${book?.fileIds}` }} |
|
|
|
source={{ uri: `https://dnvn.ir/api/v1/file/${book?.fileIds}` }} |
|
|
|
|
|
|
|
resizeMode="contain" |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw("rounded-md"), |
|
|
|
tw("rounded-sm bg-red-400"), |
|
|
|
{ height: height / 4, width: ((height / 4) * 3) / 4 }, |
|
|
|
{ height: ((width / 3) * 4) / 2.6, width: width / 3 }, |
|
|
|
]} |
|
|
|
]} |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
@ -106,9 +107,9 @@ function Book({ |
|
|
|
<Text |
|
|
|
<Text |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
fontSize: mobile ? fontSize.lg : fontSize.xl3, |
|
|
|
fontSize: mobile ? fontSize.base : fontSize.xl3, |
|
|
|
marginBottom: 5, |
|
|
|
marginBottom: 5, |
|
|
|
fontFamily: "demi", |
|
|
|
fontFamily: "bold", |
|
|
|
textAlign: ios ? "right" : "auto", |
|
|
|
textAlign: ios ? "right" : "auto", |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
@ -117,7 +118,7 @@ function Book({ |
|
|
|
<Text |
|
|
|
<Text |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
fontSize: mobile ? fontSize.base : fontSize.xl, |
|
|
|
fontSize: mobile ? fontSize.tiny : fontSize.xl, |
|
|
|
fontFamily: "regular", |
|
|
|
fontFamily: "regular", |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
@ -135,7 +136,7 @@ function Book({ |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View |
|
|
|
<View |
|
|
|
style={tw("flex flex-row-reverse items-center justify-around py-6")} |
|
|
|
style={tw("flex flex-row-reverse items-center justify-around py-8")} |
|
|
|
> |
|
|
|
> |
|
|
|
<View> |
|
|
|
<View> |
|
|
|
<Text |
|
|
|
<Text |
|
|
@ -191,7 +192,7 @@ function Book({ |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={"flex flex-col mt-6"}> |
|
|
|
<View style={"flex flex-col mt-8"}> |
|
|
|
<Text |
|
|
|
<Text |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw("w-full text-right"), |
|
|
|
tw("w-full text-right"), |
|
|
@ -207,11 +208,10 @@ function Book({ |
|
|
|
<View style={tw("flex justify-between")}></View> |
|
|
|
<View style={tw("flex justify-between")}></View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={tw("flex flex-row-reverse justify-between flex-wrap py-3")}> |
|
|
|
<View style={tw("flex flex-row-reverse justify-between flex-wrap py-3")}> |
|
|
|
<Pressable |
|
|
|
<TouchableHighlight |
|
|
|
|
|
|
|
underlayColor={Colors.theme1[colorScheme].greenFF + "22"} |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw( |
|
|
|
tw("flex flex-row-reverse w-full justify-between px-2 py-3 mb-4"), |
|
|
|
"flex flex-row-reverse w-full justify-between px-2 py-3 mb-4" |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
borderWidth: 1, |
|
|
|
borderWidth: 1, |
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
@ -226,6 +226,7 @@ function Book({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<> |
|
|
|
<Text |
|
|
|
<Text |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
fontFamily: "bold", |
|
|
|
fontFamily: "bold", |
|
|
@ -344,8 +345,10 @@ function Book({ |
|
|
|
)} |
|
|
|
)} |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</Pressable> |
|
|
|
</> |
|
|
|
<Pressable |
|
|
|
</TouchableHighlight> |
|
|
|
|
|
|
|
<TouchableHighlight |
|
|
|
|
|
|
|
underlayColor={Colors.theme1[colorScheme].greenFF + "22"} |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw("flex flex-row-reverse justify-between px-2 py-3 mb-4"), |
|
|
|
tw("flex flex-row-reverse justify-between px-2 py-3 mb-4"), |
|
|
|
{ |
|
|
|
{ |
|
|
@ -363,6 +366,7 @@ function Book({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<> |
|
|
|
<Text |
|
|
|
<Text |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
fontFamily: "bold", |
|
|
|
fontFamily: "bold", |
|
|
@ -478,8 +482,10 @@ function Book({ |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
)} |
|
|
|
)} |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</Pressable> |
|
|
|
</> |
|
|
|
<Pressable |
|
|
|
</TouchableHighlight> |
|
|
|
|
|
|
|
<TouchableHighlight |
|
|
|
|
|
|
|
underlayColor={Colors.theme1[colorScheme].greenFF + "22"} |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw("flex flex-row-reverse justify-center px-2 py-3 mb-4"), |
|
|
|
tw("flex flex-row-reverse justify-center px-2 py-3 mb-4"), |
|
|
|
{ |
|
|
|
{ |
|
|
@ -501,8 +507,9 @@ function Book({ |
|
|
|
> |
|
|
|
> |
|
|
|
مشاهده نمونه |
|
|
|
مشاهده نمونه |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</Pressable> |
|
|
|
</TouchableHighlight> |
|
|
|
<Pressable |
|
|
|
<TouchableHighlight |
|
|
|
|
|
|
|
underlayColor={Colors.theme1[colorScheme].greenFF + "22"} |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw("flex flex-row-reverse justify-between px-2 py-3 mb-4"), |
|
|
|
tw("flex flex-row-reverse justify-between px-2 py-3 mb-4"), |
|
|
|
{ |
|
|
|
{ |
|
|
@ -520,6 +527,7 @@ function Book({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<> |
|
|
|
<Text |
|
|
|
<Text |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
fontFamily: "bold", |
|
|
|
fontFamily: "bold", |
|
|
@ -547,8 +555,10 @@ function Book({ |
|
|
|
{separate(book?.product[2]?.price) + " " + "تومان"} |
|
|
|
{separate(book?.product[2]?.price) + " " + "تومان"} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</Pressable> |
|
|
|
</> |
|
|
|
<Pressable |
|
|
|
</TouchableHighlight> |
|
|
|
|
|
|
|
<TouchableHighlight |
|
|
|
|
|
|
|
underlayColor={Colors.theme1[colorScheme].greenFF + "22"} |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw("flex flex-row-reverse justify-center px-2 py-3 mb-4"), |
|
|
|
tw("flex flex-row-reverse justify-center px-2 py-3 mb-4"), |
|
|
|
{ |
|
|
|
{ |
|
|
@ -570,7 +580,7 @@ function Book({ |
|
|
|
> |
|
|
|
> |
|
|
|
پیش نمایش |
|
|
|
پیش نمایش |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</Pressable> |
|
|
|
</TouchableHighlight> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
{book?.product[type]?.description && ( |
|
|
|
{book?.product[type]?.description && ( |
|
|
|
<Description description={book?.description} /> |
|
|
|
<Description description={book?.description} /> |
|
|
|