mg-library 1.0.526 → 1.0.528

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.
package/blocks.js CHANGED
@@ -211,14 +211,16 @@ export function MGLogin(props) {
211
211
  <Layout style={[mgFunctionsLib.safeAreaViewStyleSheet(insets).safeAreaView, { display: 'flex', flexDirection: 'column', flexGrow: 1 }]}>
212
212
  <View style={{ flexDirection: 'column', flexGrow: 1, justifyContent: 'center' }}>
213
213
  <View style={{ flexDirection: 'column', alignItems: 'center', marginBottom: 100 }}>
214
- <Image
215
- source={require('./assets/clubonline.png')}
216
- style={{ width: 300, height: 150 }} />
217
214
  {!isKeyboardVisible &&
218
- <View style={{ marginHorizontal: 10, flexDirection: 'column', alignItems: 'center' }}>
219
- <Text style={{ alignSelf: 'center', textAlign: 'center' }} category='h6'>{props.appDescription}</Text>
220
- <Text style={{ alignSelf: 'center' }} category='p2'>{props.appVersion}</Text>
221
- </View>
215
+ <>
216
+ <Image
217
+ source={require('./assets/clubonline.png')}
218
+ style={{ width: 300, height: 150 }} />
219
+ <View style={{ marginHorizontal: 10, flexDirection: 'column', alignItems: 'center' }}>
220
+ <Text style={{ alignSelf: 'center', textAlign: 'center' }} category='h6'>{props.appDescription}</Text>
221
+ <Text style={{ alignSelf: 'center' }} category='p2'>{props.appVersion}</Text>
222
+ </View>
223
+ </>
222
224
  }
223
225
  </View>
224
226
  <View>
package/functions.js CHANGED
@@ -254,7 +254,10 @@ function showToast(config) {
254
254
  }
255
255
 
256
256
  export function showToastWithError(error, subMessage) {
257
- let message = '(' + error.name + ')' + ' | ' + error.message;
257
+ let message = '';
258
+ if (error.name != undefined)
259
+ if (error.message != undefined)
260
+ message = '(' + error.name + ')' + ' | ' + error.message;
258
261
  if (subMessage != undefined)
259
262
  message = message + ' | ' + subMessage;
260
263
  if (error.response != undefined)
@@ -263,6 +266,12 @@ export function showToastWithError(error, subMessage) {
263
266
  if (error.response.data.extended_code != undefined)
264
267
  if (error.response.data.message != undefined)
265
268
  message = message + ' > ' + error.response.data.code + ' | ' + error.response.data.extended_code + ' | ' + error.response.data.message
269
+ if (message = '') {
270
+ try {
271
+ message = error;
272
+ } catch (e) {
273
+ }
274
+ }
266
275
  let config = {
267
276
  message: message,
268
277
  backgroundColor: 'red'
package/mg-library.rar CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.526",
3
+ "version": "1.0.528",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {