tek-wallet 0.0.3 → 0.0.4
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.
|
@@ -14,7 +14,7 @@ var AuthContext = react_1.default.createContext(null);
|
|
|
14
14
|
function AuthProvider(_a) {
|
|
15
15
|
var children = _a.children;
|
|
16
16
|
var timeout = react_1.default.useRef(undefined);
|
|
17
|
-
var _b = (0, react_2.useSession)(), session = _b.data, status = _b.status
|
|
17
|
+
var _b = (0, react_2.useSession)(), session = _b.data, status = _b.status;
|
|
18
18
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
19
19
|
react_1.default.useEffect(function () {
|
|
20
20
|
if (session) {
|
|
@@ -35,8 +35,9 @@ function AuthProvider(_a) {
|
|
|
35
35
|
var expiredTime = +((_a = session === null || session === void 0 ? void 0 : session.expires) !== null && _a !== void 0 ? _a : 0);
|
|
36
36
|
var currentTime = Date.now();
|
|
37
37
|
var timeDiff = Math.max(expiredTime - currentTime, 0);
|
|
38
|
+
console.warn("🚀 ~ React.useEffect ~ timeDiff:", timeDiff);
|
|
38
39
|
timeout.current = setTimeout(function () {
|
|
39
|
-
update();
|
|
40
|
+
// update();
|
|
40
41
|
}, timeDiff);
|
|
41
42
|
return function () { return clearTimeout(timeout.current); };
|
|
42
43
|
}, [session === null || session === void 0 ? void 0 : session.expires]);
|