mg-library 1.0.360 → 1.0.362

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/blocks.js +27 -29
  2. package/package.json +1 -1
package/blocks.js CHANGED
@@ -57,36 +57,34 @@ export function MGWelcome(props) {
57
57
  );
58
58
  };
59
59
 
60
- if (!mgFunctionsLib.isEmpty(props.notices)) {
61
- return (
62
- <View style={mgFunctionsLib.getBasicStyleSheet().availableArea}>
63
- <FlatList
64
- data={props.notices}
65
- keyExtractor={item => item.idNotice.toString()}
66
- renderItem={({ item }) => (
67
- <Card header={cardHeader(item)} style={{ marginBottom: 10, marginHorizontal: 10 }}>
68
- <Text>
69
- <Text style={{ marginBottom: 10 }}>{item.content}</Text>
70
- </Text>
71
- </Card>
72
- )}
73
- ListHeaderComponent={listHeaderComponent}
74
- />
75
- )
60
+ let listFooterComponent = (<></>);
61
+
62
+ if (mgFunctionsLib.isEmpty(props.notices)) {
63
+ listFooterComponent = (
64
+ <View style={{ flexGrow: 1, alignItems: 'center' }}>
65
+ <Image style={{ width: 300, height: 150, marginTop: 70 }} source={require('./assets/welcome.png')} />
76
66
  </View>
77
- )
78
- } else {
79
- return (
80
- <View style={mgFunctionsLib.getBasicStyleSheet().availableArea}>
81
- <View style={{flexGrow: 1, flexDirection: 'column'}}>
82
- {listHeaderComponent}
83
- <Card style={{flexGrow: 1, flexDirection: 'column', alignItems:'center'}}>
84
- <Image style={{width: 300, height: 150, marginTop: 30, marginBottom: 30}} source={require('./assets/welcome.png')} />
85
- </Card>
86
- </View>
87
- </View>
88
- )
89
- }
67
+ );
68
+ }
69
+
70
+ return (
71
+ <View style={mgFunctionsLib.getBasicStyleSheet().availableArea}>
72
+ <FlatList
73
+ data={props.notices}
74
+ keyExtractor={item => item.idNotice.toString()}
75
+ renderItem={({ item }) => (
76
+ <Card header={cardHeader(item)} style={{ marginBottom: 10, marginHorizontal: 10 }}>
77
+ <Text>
78
+ <Text style={{ marginBottom: 10 }}>{item.content}</Text>
79
+ </Text>
80
+ </Card>
81
+ )}
82
+ ListHeaderComponent={listHeaderComponent}
83
+ ListFooterComponent={listFooterComponent}
84
+ />
85
+ )
86
+ </View>
87
+ )
90
88
 
91
89
  }
92
90
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.360",
3
+ "version": "1.0.362",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {