@sunggang/ui-lib 0.2.43 → 0.2.44
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/index.esm2.js +13 -6
- package/package.json +1 -1
package/index.esm2.js
CHANGED
|
@@ -43806,18 +43806,18 @@ var LiffProvider = function(param) {
|
|
|
43806
43806
|
useEffect(function() {
|
|
43807
43807
|
var checkAndInitialize = function() {
|
|
43808
43808
|
var _ref = _async_to_generator(function() {
|
|
43809
|
-
var loginStore, jwtToken, _parsedStore_data, parsedStore,
|
|
43809
|
+
var loginStore, jwtToken, _parsedStore_data, parsedStore, isValid, _tmp, testIsValid;
|
|
43810
43810
|
return _ts_generator(this, function(_state) {
|
|
43811
43811
|
switch(_state.label){
|
|
43812
43812
|
case 0:
|
|
43813
43813
|
loginStore = window.localStorage.getItem(localStorageKey);
|
|
43814
|
-
jwtToken =
|
|
43814
|
+
jwtToken = "";
|
|
43815
43815
|
if (loginStore) {
|
|
43816
43816
|
try {
|
|
43817
43817
|
;
|
|
43818
43818
|
parsedStore = JSON.parse(loginStore);
|
|
43819
|
-
;
|
|
43820
|
-
jwtToken = (
|
|
43819
|
+
console.log("parsedStore: ", parsedStore);
|
|
43820
|
+
jwtToken = (parsedStore === null || parsedStore === void 0 ? void 0 : (_parsedStore_data = parsedStore.data) === null || _parsedStore_data === void 0 ? void 0 : _parsedStore_data.access_token) || "";
|
|
43821
43821
|
} catch (err) {
|
|
43822
43822
|
console.error("LocalStorage 解析失敗:", err);
|
|
43823
43823
|
}
|
|
@@ -43841,12 +43841,19 @@ var LiffProvider = function(param) {
|
|
|
43841
43841
|
_state.label = 3;
|
|
43842
43842
|
case 3:
|
|
43843
43843
|
isValid = _tmp;
|
|
43844
|
-
console.log("token isValid: ", isValid);
|
|
43845
43844
|
return [
|
|
43846
43845
|
4,
|
|
43847
|
-
|
|
43846
|
+
checkTokenFunc(jwtToken)
|
|
43848
43847
|
];
|
|
43849
43848
|
case 4:
|
|
43849
|
+
testIsValid = _state.sent();
|
|
43850
|
+
console.log("token valid: ", isValid);
|
|
43851
|
+
console.log("test Valid: ", testIsValid);
|
|
43852
|
+
return [
|
|
43853
|
+
4,
|
|
43854
|
+
initializeLiff(isValid)
|
|
43855
|
+
];
|
|
43856
|
+
case 5:
|
|
43850
43857
|
_state.sent();
|
|
43851
43858
|
return [
|
|
43852
43859
|
2
|