|
@@ -22,39 +22,41 @@ type Props = {
|
|
|
export default function HomeFeaturesView(props: Props) {
|
|
|
return (
|
|
|
<View style={styles.contanier}>
|
|
|
- <View style={styles.header}>
|
|
|
- <Image
|
|
|
- style={styles.background}
|
|
|
- source={require('@app/assets/images/home/home_section_background.png')}
|
|
|
- />
|
|
|
- <Text style={styles.title} numberOfLines={1}>
|
|
|
- 精品服务
|
|
|
- </Text>
|
|
|
- </View>
|
|
|
- {props.error && props.error.type !== 'Cancel' && (
|
|
|
- <DataEmpty
|
|
|
- reload={() => {
|
|
|
- props.reload && props.reload();
|
|
|
- }}
|
|
|
- />
|
|
|
- )}
|
|
|
- {props.error === undefined && props.features && (
|
|
|
- <View style={styles.items}>
|
|
|
- {props.features.map((feature, index) => {
|
|
|
- return (
|
|
|
- <FeatureButtons
|
|
|
- key={index}
|
|
|
- title={feature.name}
|
|
|
- image={{ uri: feature.icon }}
|
|
|
- badge={feature.badge}
|
|
|
- onPress={() => {
|
|
|
- props.onPress && props.onPress(index);
|
|
|
- }}
|
|
|
- />
|
|
|
- );
|
|
|
- })}
|
|
|
+ <View style={styles.content}>
|
|
|
+ <View style={styles.header}>
|
|
|
+ <Image
|
|
|
+ style={styles.background}
|
|
|
+ source={require('@app/assets/images/home/home_section_background.png')}
|
|
|
+ />
|
|
|
+ <Text style={styles.title} numberOfLines={1}>
|
|
|
+ 精品服务
|
|
|
+ </Text>
|
|
|
</View>
|
|
|
- )}
|
|
|
+ {props.error && props.error.type !== 'Cancel' && (
|
|
|
+ <DataEmpty
|
|
|
+ reload={() => {
|
|
|
+ props.reload && props.reload();
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {props.error === undefined && props.features && (
|
|
|
+ <View style={styles.items}>
|
|
|
+ {props.features.map((feature, index) => {
|
|
|
+ return (
|
|
|
+ <FeatureButtons
|
|
|
+ key={index}
|
|
|
+ title={feature.name}
|
|
|
+ image={{ uri: feature.icon }}
|
|
|
+ badge={feature.badge}
|
|
|
+ onPress={() => {
|
|
|
+ props.onPress && props.onPress(index);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ </View>
|
|
|
+ )}
|
|
|
+ </View>
|
|
|
</View>
|
|
|
);
|
|
|
}
|