@trustchex/react-native-sdk 1.245.0 → 1.248.0
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/lib/module/Screens/Static/ResultScreen.js +2 -7
- package/lib/module/Screens/Static/VerificationSessionCheckScreen.js +2 -7
- package/lib/typescript/src/Screens/Static/ResultScreen.d.ts.map +1 -1
- package/lib/typescript/src/Screens/Static/VerificationSessionCheckScreen.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Screens/Static/ResultScreen.tsx +11 -9
- package/src/Screens/Static/VerificationSessionCheckScreen.tsx +5 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, { useCallback, useContext, useEffect, useState } from 'react';
|
|
3
|
+
import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { Alert, Image, Platform, SafeAreaView, ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
5
5
|
import AppContext from "../../Shared/Contexts/AppContext.js";
|
|
6
6
|
import httpClient from "../../Shared/Libs/http-client.js";
|
|
@@ -22,17 +22,12 @@ const ResultScreen = () => {
|
|
|
22
22
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
23
23
|
const [progress, setProgress] = useState(0);
|
|
24
24
|
const navigationManagerRef = React.useRef(null);
|
|
25
|
-
const [apiUrl, setApiUrl] = useState(`${appContext.baseUrl}/api/app/mobile`);
|
|
26
25
|
const [shouldShowDemoData, setShouldShowDemoData] = useState(false);
|
|
27
26
|
const [deviceIdentifier, setDeviceIdentifier] = useState('');
|
|
28
27
|
const {
|
|
29
28
|
t
|
|
30
29
|
} = useTranslation();
|
|
31
|
-
|
|
32
|
-
if (appContext.baseUrl) {
|
|
33
|
-
setApiUrl(`${appContext.baseUrl}/api/app/mobile`);
|
|
34
|
-
}
|
|
35
|
-
}, [appContext.baseUrl]);
|
|
30
|
+
const apiUrl = useMemo(() => `${appContext.baseUrl}/api/app/mobile`, [appContext.baseUrl]);
|
|
36
31
|
useEffect(() => {
|
|
37
32
|
if (appContext.isDemoSession) {
|
|
38
33
|
setShouldShowDemoData(true);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import { SafeAreaView, Text, StyleSheet, Alert, View, Image, Dimensions, KeyboardAvoidingView, Platform, ScrollView } from 'react-native';
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
6
|
import AppContext from "../../Shared/Contexts/AppContext.js";
|
|
@@ -28,15 +28,10 @@ const VerificationSessionCheckScreen = () => {
|
|
|
28
28
|
} = useTranslation();
|
|
29
29
|
const navigationManagerRef = React.useRef(null);
|
|
30
30
|
const navigation = useNavigation();
|
|
31
|
-
const [apiUrl, setApiUrl] = useState(`${appContext.baseUrl}/api/app/mobile`);
|
|
32
31
|
const theme = useTheme();
|
|
33
32
|
const initialized = useRef(false);
|
|
34
33
|
const insets = useSafeAreaInsets();
|
|
35
|
-
|
|
36
|
-
if (appContext.baseUrl) {
|
|
37
|
-
setApiUrl(`${appContext.baseUrl}/api/app/mobile`);
|
|
38
|
-
}
|
|
39
|
-
}, [appContext.baseUrl]);
|
|
34
|
+
const apiUrl = useMemo(() => `${appContext.baseUrl}/api/app/mobile`, [appContext.baseUrl]);
|
|
40
35
|
const validateSessionCode = useCallback(value => {
|
|
41
36
|
return SESSION_CODE_VALIDATION_PATTERN.test(value.toUpperCase());
|
|
42
37
|
}, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultScreen.d.ts","sourceRoot":"","sources":["../../../../../src/Screens/Static/ResultScreen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResultScreen.d.ts","sourceRoot":"","sources":["../../../../../src/Screens/Static/ResultScreen.tsx"],"names":[],"mappings":"AAuCA,QAAA,MAAM,YAAY,+CAwuBjB,CAAC;AAsGF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerificationSessionCheckScreen.d.ts","sourceRoot":"","sources":["../../../../../src/Screens/Static/VerificationSessionCheckScreen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VerificationSessionCheckScreen.d.ts","sourceRoot":"","sources":["../../../../../src/Screens/Static/VerificationSessionCheckScreen.tsx"],"names":[],"mappings":"AA0CA,QAAA,MAAM,8BAA8B,+CA4YnC,CAAC;AA0IF,eAAe,8BAA8B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
useCallback,
|
|
3
|
+
useContext,
|
|
4
|
+
useEffect,
|
|
5
|
+
useMemo,
|
|
6
|
+
useState,
|
|
7
|
+
} from 'react';
|
|
2
8
|
import {
|
|
3
9
|
Alert,
|
|
4
10
|
Image,
|
|
@@ -36,18 +42,14 @@ const ResultScreen = () => {
|
|
|
36
42
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
37
43
|
const [progress, setProgress] = useState(0);
|
|
38
44
|
const navigationManagerRef = React.useRef<NavigationManagerRef>(null);
|
|
39
|
-
const [apiUrl, setApiUrl] = useState<string>(
|
|
40
|
-
`${appContext.baseUrl}/api/app/mobile`
|
|
41
|
-
);
|
|
42
45
|
const [shouldShowDemoData, setShouldShowDemoData] = useState(false);
|
|
43
46
|
const [deviceIdentifier, setDeviceIdentifier] = useState<string>('');
|
|
44
47
|
const { t } = useTranslation();
|
|
45
48
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}, [appContext.baseUrl]);
|
|
49
|
+
const apiUrl = useMemo(
|
|
50
|
+
() => `${appContext.baseUrl}/api/app/mobile`,
|
|
51
|
+
[appContext.baseUrl]
|
|
52
|
+
);
|
|
51
53
|
|
|
52
54
|
useEffect(() => {
|
|
53
55
|
if (appContext.isDemoSession) {
|
|
@@ -2,6 +2,7 @@ import React, {
|
|
|
2
2
|
useCallback,
|
|
3
3
|
useContext,
|
|
4
4
|
useEffect,
|
|
5
|
+
useMemo,
|
|
5
6
|
useRef,
|
|
6
7
|
useState,
|
|
7
8
|
} from 'react';
|
|
@@ -50,18 +51,14 @@ const VerificationSessionCheckScreen = () => {
|
|
|
50
51
|
const { t } = useTranslation();
|
|
51
52
|
const navigationManagerRef = React.useRef<NavigationManagerRef>(null);
|
|
52
53
|
const navigation = useNavigation();
|
|
53
|
-
const [apiUrl, setApiUrl] = useState<string>(
|
|
54
|
-
`${appContext.baseUrl}/api/app/mobile`
|
|
55
|
-
);
|
|
56
54
|
const theme = useTheme();
|
|
57
55
|
const initialized = useRef(false);
|
|
58
56
|
const insets = useSafeAreaInsets();
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}, [appContext.baseUrl]);
|
|
58
|
+
const apiUrl = useMemo(
|
|
59
|
+
() => `${appContext.baseUrl}/api/app/mobile`,
|
|
60
|
+
[appContext.baseUrl]
|
|
61
|
+
);
|
|
65
62
|
|
|
66
63
|
const validateSessionCode = useCallback((value: string) => {
|
|
67
64
|
return SESSION_CODE_VALIDATION_PATTERN.test(value.toUpperCase());
|