mg-library 1.0.353 → 1.0.355

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 (3) hide show
  1. package/blocks.js +28 -16
  2. package/package.json +1 -1
  3. package/reducers.js +0 -2
package/blocks.js CHANGED
@@ -57,22 +57,34 @@ export function MGWelcome(props) {
57
57
  );
58
58
  };
59
59
 
60
- return (
61
- <View style={mgFunctionsLib.getBasicStyleSheet().availableArea}>
62
- <FlatList
63
- data={props.notices}
64
- keyExtractor={item => item.idNotice.toString()}
65
- renderItem={({ item }) => (
66
- <Card header={cardHeader(item)} style={{ marginBottom: 10, marginHorizontal: 10 }}>
67
- <Text>
68
- <Text style={{ marginBottom: 10 }}>{item.content}</Text>
69
- </Text>
70
- </Card>
71
- )}
72
- ListHeaderComponent={listHeaderComponent}
73
- />
74
- </View>
75
- );
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
+ )
76
+ </View>
77
+ )
78
+ } else {
79
+ return (
80
+ <>
81
+ {listHeaderComponent}
82
+ <Card style={{flex: 1, flexDirection: 'column', alignItems:'center'}}>
83
+ <Image style={{width: 300, height: 150, marginTop: 30, marginBottom: 30}} source={require('./assets/welcome.png')} />
84
+ </Card>
85
+ </>
86
+ )
87
+ }
76
88
 
77
89
  }
78
90
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.353",
3
+ "version": "1.0.355",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/reducers.js CHANGED
@@ -38,11 +38,9 @@ export const mgLogin = (state, action) => {
38
38
  state.server = server;
39
39
  state.company = company;
40
40
  state.accessToken = accessToken;
41
- return state;
42
41
  }
43
42
 
44
43
  export const mgLogout = (state) => {
45
44
  state.isLoggedIn = false;
46
45
  state.accessToken = '';
47
- return state;
48
46
  }