@trustchex/react-native-sdk 1.249.0 → 1.250.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/Trustchex.js +11 -16
- package/lib/typescript/src/Trustchex.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Trustchex.tsx +11 -19
package/lib/module/Trustchex.js
CHANGED
|
@@ -70,22 +70,17 @@ const Trustchex = ({
|
|
|
70
70
|
initializeTTS();
|
|
71
71
|
}, []);
|
|
72
72
|
useEffect(() => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
setIsInitialized(true);
|
|
86
|
-
}, 100);
|
|
87
|
-
return () => clearTimeout(timer);
|
|
88
|
-
}, [propBaseUrl, propSessionId, baseUrl, sessionId]);
|
|
73
|
+
if (propSessionId) {
|
|
74
|
+
setSessionId(propSessionId);
|
|
75
|
+
}
|
|
76
|
+
if (propBaseUrl) {
|
|
77
|
+
setBaseUrl(propBaseUrl);
|
|
78
|
+
const timer = setTimeout(() => {
|
|
79
|
+
setIsInitialized(true);
|
|
80
|
+
}, 1000);
|
|
81
|
+
return () => clearTimeout(timer);
|
|
82
|
+
}
|
|
83
|
+
}, [propBaseUrl, propSessionId]);
|
|
89
84
|
useEffect(() => {
|
|
90
85
|
if (propLocale) {
|
|
91
86
|
setLocale(propLocale);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trustchex.d.ts","sourceRoot":"","sources":["../../../src/Trustchex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,OAAO,gCAAgC,CAAC;AAexC,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AASD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"Trustchex.d.ts","sourceRoot":"","sources":["../../../src/Trustchex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,OAAO,gCAAgC,CAAC;AAexC,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AASD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAmIvC,CAAC;AAWF,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
package/src/Trustchex.tsx
CHANGED
|
@@ -101,27 +101,19 @@ const Trustchex: React.FC<TrustchexProps> = ({
|
|
|
101
101
|
}, []);
|
|
102
102
|
|
|
103
103
|
useEffect(() => {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (propBaseUrl && propBaseUrl !== baseUrl) {
|
|
108
|
-
shouldUpdate = true;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if (propSessionId !== undefined && propSessionId !== sessionId) {
|
|
112
|
-
shouldUpdate = true;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (shouldUpdate && propBaseUrl && propSessionId !== undefined) {
|
|
116
|
-
setBaseUrl(propBaseUrl);
|
|
117
|
-
setSessionId(propSessionId);
|
|
118
|
-
}
|
|
104
|
+
if (propSessionId) {
|
|
105
|
+
setSessionId(propSessionId);
|
|
106
|
+
}
|
|
119
107
|
|
|
120
|
-
|
|
121
|
-
|
|
108
|
+
if (propBaseUrl) {
|
|
109
|
+
setBaseUrl(propBaseUrl);
|
|
110
|
+
const timer = setTimeout(() => {
|
|
111
|
+
setIsInitialized(true);
|
|
112
|
+
}, 1000);
|
|
122
113
|
|
|
123
|
-
|
|
124
|
-
|
|
114
|
+
return () => clearTimeout(timer);
|
|
115
|
+
}
|
|
116
|
+
}, [propBaseUrl, propSessionId]);
|
|
125
117
|
|
|
126
118
|
useEffect(() => {
|
|
127
119
|
if (propLocale) {
|