|
|
|
@ -6,7 +6,6 @@ import { |
|
|
|
|
ScrollView, |
|
|
|
|
TouchableHighlight, |
|
|
|
|
Dimensions, |
|
|
|
|
Appearance, |
|
|
|
|
Platform, |
|
|
|
|
} from "react-native"; |
|
|
|
|
import { useNavigation } from "@react-navigation/native"; |
|
|
|
@ -44,8 +43,8 @@ function Book({ |
|
|
|
|
userFavoriteLoading, |
|
|
|
|
mobile, |
|
|
|
|
userProducts, |
|
|
|
|
theme |
|
|
|
|
}) { |
|
|
|
|
const colorScheme = Appearance.getColorScheme(); |
|
|
|
|
const navigation = useNavigation(); |
|
|
|
|
const [type, setType] = useState(1); |
|
|
|
|
const [pageLoading, setPageLoading] = useState(false); |
|
|
|
@ -80,9 +79,9 @@ function Book({ |
|
|
|
|
tw("absolute left-0 top-0 rounded-md overflow-hidden"), |
|
|
|
|
{ |
|
|
|
|
width: Dimensions.get("window").width, |
|
|
|
|
height: height - 200, |
|
|
|
|
height: height - 110, |
|
|
|
|
zIndex: 1, |
|
|
|
|
backgroundColor: Colors.theme1[colorScheme].white + "60", |
|
|
|
|
backgroundColor: Colors.theme1[theme].white + "60", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
@ -111,7 +110,7 @@ function Book({ |
|
|
|
|
<View style={tw("flex items-end")}> |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontSize: mobile ? fontSize.base : fontSize.xl3, |
|
|
|
|
marginBottom: 5, |
|
|
|
|
fontFamily: "bold", |
|
|
|
@ -122,7 +121,7 @@ function Book({ |
|
|
|
|
</Text> |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontSize: mobile ? fontSize.tiny : fontSize.xl, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}} |
|
|
|
@ -146,7 +145,7 @@ function Book({ |
|
|
|
|
<View> |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
textAlign: "center", |
|
|
|
|
fontSize: mobile ? fontSize.tiny : fontSize.lg, |
|
|
|
|
fontFamily: "regular", |
|
|
|
@ -158,7 +157,7 @@ function Book({ |
|
|
|
|
</View> |
|
|
|
|
<View |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: Colors.theme1[colorScheme].green79 + "55", |
|
|
|
|
backgroundColor: Colors.theme1[theme].green79 + "55", |
|
|
|
|
height: 20, |
|
|
|
|
width: 2, |
|
|
|
|
}} |
|
|
|
@ -166,7 +165,7 @@ function Book({ |
|
|
|
|
<View> |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
textAlign: "center", |
|
|
|
|
fontSize: mobile ? fontSize.tiny : fontSize.lg, |
|
|
|
|
fontFamily: "regular", |
|
|
|
@ -178,7 +177,7 @@ function Book({ |
|
|
|
|
</View> |
|
|
|
|
<View |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: Colors.theme1[colorScheme].green79 + "55", |
|
|
|
|
backgroundColor: Colors.theme1[theme].green79 + "55", |
|
|
|
|
height: 20, |
|
|
|
|
width: 2, |
|
|
|
|
}} |
|
|
|
@ -186,7 +185,7 @@ function Book({ |
|
|
|
|
<View> |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
textAlign: "center", |
|
|
|
|
fontSize: mobile ? fontSize.tiny : fontSize.lg, |
|
|
|
|
fontFamily: "regular", |
|
|
|
@ -202,7 +201,7 @@ function Book({ |
|
|
|
|
style={[ |
|
|
|
|
tw("w-full text-right"), |
|
|
|
|
{ |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontSize: mobile ? fontSize.tiny : fontSize.lg, |
|
|
|
|
fontFamily: "demi", |
|
|
|
|
}, |
|
|
|
@ -214,13 +213,13 @@ function Book({ |
|
|
|
|
</View> |
|
|
|
|
<View style={tw("flex flex-row-reverse justify-between flex-wrap py-3")}> |
|
|
|
|
<TouchableHighlight |
|
|
|
|
underlayColor={Colors.theme1[colorScheme].greenFF + "22"} |
|
|
|
|
underlayColor={Colors.theme1[theme].greenFF + "22"} |
|
|
|
|
style={[ |
|
|
|
|
tw("flex flex-row-reverse w-full justify-between px-2 py-3 mb-4"), |
|
|
|
|
{ |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
|
|
backgroundColor: Colors.theme1[colorScheme].greenFF + "0a", |
|
|
|
|
borderColor: Colors.theme1[theme].greenCF, |
|
|
|
|
backgroundColor: Colors.theme1[theme].greenFF + "0a", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
onPress={() => |
|
|
|
@ -244,7 +243,7 @@ function Book({ |
|
|
|
|
style={{ |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
fontSize: fontSize.sm, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
paddingVertical: 4, |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
@ -258,7 +257,7 @@ function Book({ |
|
|
|
|
tw("py-1 pr-2"), |
|
|
|
|
{ |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontSize: fontSize.sm, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -270,13 +269,13 @@ function Book({ |
|
|
|
|
</> |
|
|
|
|
</TouchableHighlight> |
|
|
|
|
<TouchableHighlight |
|
|
|
|
underlayColor={Colors.theme1[colorScheme].greenFF + "22"} |
|
|
|
|
underlayColor={Colors.theme1[theme].greenFF + "22"} |
|
|
|
|
style={[ |
|
|
|
|
tw("flex flex-row-reverse justify-between px-2 py-3 mb-4"), |
|
|
|
|
{ |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
|
|
backgroundColor: Colors.theme1[colorScheme].greenFF + "0a", |
|
|
|
|
borderColor: Colors.theme1[theme].greenCF, |
|
|
|
|
backgroundColor: Colors.theme1[theme].greenFF + "0a", |
|
|
|
|
width: width - 32 - 8 - (fontSize.sm * 6 + 18), |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -301,7 +300,7 @@ function Book({ |
|
|
|
|
style={{ |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
fontSize: fontSize.sm, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
paddingVertical: 4, |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
@ -313,9 +312,9 @@ function Book({ |
|
|
|
|
tw("py-1 pr-2"), |
|
|
|
|
{ |
|
|
|
|
borderRightWidth: 1, |
|
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
|
|
borderColor: Colors.theme1[theme].greenCF, |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontSize: fontSize.sm, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -326,13 +325,13 @@ function Book({ |
|
|
|
|
</> |
|
|
|
|
</TouchableHighlight> |
|
|
|
|
<TouchableHighlight |
|
|
|
|
underlayColor={Colors.theme1[colorScheme].greenFF + "22"} |
|
|
|
|
underlayColor={Colors.theme1[theme].greenFF + "22"} |
|
|
|
|
style={[ |
|
|
|
|
tw("flex flex-row-reverse justify-center px-2 py-3 mb-4"), |
|
|
|
|
{ |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
|
|
backgroundColor: Colors.theme1[colorScheme].greenFF + "0a", |
|
|
|
|
borderColor: Colors.theme1[theme].greenCF, |
|
|
|
|
backgroundColor: Colors.theme1[theme].greenFF + "0a", |
|
|
|
|
width: fontSize.sm * 6 + 18, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -341,8 +340,8 @@ function Book({ |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
fontSize: fontSize.sm, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
fontSize: fontSize.xs, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
paddingVertical: 4, |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
@ -350,13 +349,13 @@ function Book({ |
|
|
|
|
</Text> |
|
|
|
|
</TouchableHighlight> |
|
|
|
|
<TouchableHighlight |
|
|
|
|
underlayColor={Colors.theme1[colorScheme].greenFF + "22"} |
|
|
|
|
underlayColor={Colors.theme1[theme].greenFF + "22"} |
|
|
|
|
style={[ |
|
|
|
|
tw("flex flex-row-reverse justify-between px-2 py-3 mb-4"), |
|
|
|
|
{ |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
|
|
backgroundColor: Colors.theme1[colorScheme].greenFF + "0a", |
|
|
|
|
borderColor: Colors.theme1[theme].greenCF, |
|
|
|
|
backgroundColor: Colors.theme1[theme].greenFF + "0a", |
|
|
|
|
width: width - 32 - 8 - (fontSize.sm * 6 + 18), |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -373,7 +372,7 @@ function Book({ |
|
|
|
|
style={{ |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
fontSize: fontSize.sm, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
paddingVertical: 4, |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
@ -386,7 +385,7 @@ function Book({ |
|
|
|
|
tw("py-1 pr-2"), |
|
|
|
|
{ |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontSize: fontSize.sm, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -397,13 +396,13 @@ function Book({ |
|
|
|
|
</> |
|
|
|
|
</TouchableHighlight> |
|
|
|
|
<TouchableHighlight |
|
|
|
|
underlayColor={Colors.theme1[colorScheme].greenFF + "22"} |
|
|
|
|
underlayColor={Colors.theme1[theme].greenFF + "22"} |
|
|
|
|
style={[ |
|
|
|
|
tw("flex flex-row-reverse justify-center px-2 py-3 mb-4"), |
|
|
|
|
{ |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: Colors.theme1[colorScheme].greenCF, |
|
|
|
|
backgroundColor: Colors.theme1[colorScheme].greenFF + "0a", |
|
|
|
|
borderColor: Colors.theme1[theme].greenCF, |
|
|
|
|
backgroundColor: Colors.theme1[theme].greenFF + "0a", |
|
|
|
|
width: fontSize.sm * 6 + 18, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -412,8 +411,8 @@ function Book({ |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
fontSize: fontSize.sm, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
fontSize: fontSize.xs, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
paddingVertical: 4, |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
@ -479,6 +478,7 @@ const mapStateToProps = (state) => ({ |
|
|
|
|
userProductsLoading: state.userProduct.loading, |
|
|
|
|
userFavoriteLoading: state.userFavorite.loading, |
|
|
|
|
mobile: state.publicApi.mobile, |
|
|
|
|
theme: state.publicApi.theme |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = { |
|
|
|
|