mg-library 1.0.332 → 1.0.334

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 +7 -10
  2. package/package.json +1 -1
package/blocks.js CHANGED
@@ -16,9 +16,6 @@ import * as mgLoginLib from './login.js';
16
16
 
17
17
  export default function MGLogin(props) {
18
18
 
19
- let server = props.useSelector((state) => state.session.server);
20
- let language = props.useSelector((state) => state.session.language);
21
-
22
19
  const { control, handleSubmit, formState: { errors } } = useForm({
23
20
  defaultValues: { userName: '', password: '' },
24
21
  });
@@ -27,7 +24,7 @@ export default function MGLogin(props) {
27
24
 
28
25
  let cardHeader = (
29
26
  <View style={{ flex: 1, flexGrow: 1, flexDirection: 'row' }}>
30
- <Text category='h6' style={{ alignSelf: 'center', color: props.theme['color-primary-500'] }}>{mgFunctionsLib.i18nString('credentials', language)}</Text>
27
+ <Text category='h6' style={{ alignSelf: 'center', color: props.theme['color-primary-500'] }}>{mgFunctionsLib.i18nString('credentials', props.language)}</Text>
31
28
  </View>
32
29
  );
33
30
 
@@ -44,13 +41,13 @@ export default function MGLogin(props) {
44
41
  mgLoginLib.onPressLogin(
45
42
  props.dispatch,
46
43
  props.actions,
47
- server,
44
+ props.server,
48
45
  props.app,
49
46
  props.apiUrl,
50
- language,
47
+ props.language,
51
48
  data);
52
49
  })}>
53
- {mgFunctionsLib.i18nString('login', language)}
50
+ {mgFunctionsLib.i18nString('login', props.language)}
54
51
  </Button>
55
52
  </View>
56
53
  );
@@ -63,7 +60,7 @@ export default function MGLogin(props) {
63
60
  <Image
64
61
  source={require('./assets/clubonline.png')}
65
62
  style={{ width: 300, height: 150 }} />
66
- <Text category='h6'>{mgFunctionsLib.i18nString('appDescription', language)}</Text>
63
+ <Text category='h6'>{mgFunctionsLib.i18nString('appDescription', props.language)}</Text>
67
64
  <Text category='p2'>{props.appVersion}</Text>
68
65
  </View>
69
66
  <View>
@@ -76,7 +73,7 @@ export default function MGLogin(props) {
76
73
  render={({ field: { onChange, value } }) => (
77
74
  <Input
78
75
  size='large'
79
- placeholder={mgFunctionsLib.i18nString('userName', language)}
76
+ placeholder={mgFunctionsLib.i18nString('userName', props.language)}
80
77
  onChangeText={onChange}
81
78
  value={value}
82
79
  />
@@ -88,7 +85,7 @@ export default function MGLogin(props) {
88
85
  render={({ field: { onChange, value } }) => (
89
86
  <Input
90
87
  size='large'
91
- placeholder={mgFunctionsLib.i18nString('password', language)}
88
+ placeholder={mgFunctionsLib.i18nString('password', props.language)}
92
89
  onChangeText={onChange}
93
90
  secureTextEntry={true}
94
91
  value={value}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.332",
3
+ "version": "1.0.334",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {