@ic-reactor/react 1.7.6 → 1.7.7
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.
|
@@ -157,7 +157,7 @@ const actorHooks = (actorManager) => {
|
|
|
157
157
|
}
|
|
158
158
|
return () => clearInterval(intervalId.current);
|
|
159
159
|
}, [refetchInterval, refetchOnMount]);
|
|
160
|
-
return Object.assign({ call }, state);
|
|
160
|
+
return Object.assign({ call, intervalId }, state);
|
|
161
161
|
};
|
|
162
162
|
const useUpdateCall = useSharedCall;
|
|
163
163
|
const useMethod = (params) => {
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* @example
|
|
5
5
|
* ```jsx
|
|
6
6
|
* function AuthStateComponent() {
|
|
7
|
-
* const {
|
|
7
|
+
* const { authenticated, authenticating, identity, error } = useAuthState();
|
|
8
8
|
*
|
|
9
9
|
* return (
|
|
10
10
|
* <div>
|
|
11
11
|
* {authenticating ? 'Authenticating...' : ''}
|
|
12
12
|
* {error ? `Error: ${error.message}` : ''}
|
|
13
|
-
* {
|
|
13
|
+
* {authenticated ? `User ${identity?.getPrincipal()} is authenticated.` : 'User is not authenticated.'}
|
|
14
14
|
* </div>
|
|
15
15
|
* );
|
|
16
16
|
* }
|
|
@@ -11,13 +11,13 @@ const hooks_1 = __importDefault(require("./hooks"));
|
|
|
11
11
|
* @example
|
|
12
12
|
* ```jsx
|
|
13
13
|
* function AuthStateComponent() {
|
|
14
|
-
* const {
|
|
14
|
+
* const { authenticated, authenticating, identity, error } = useAuthState();
|
|
15
15
|
*
|
|
16
16
|
* return (
|
|
17
17
|
* <div>
|
|
18
18
|
* {authenticating ? 'Authenticating...' : ''}
|
|
19
19
|
* {error ? `Error: ${error.message}` : ''}
|
|
20
|
-
* {
|
|
20
|
+
* {authenticated ? `User ${identity?.getPrincipal()} is authenticated.` : 'User is not authenticated.'}
|
|
21
21
|
* </div>
|
|
22
22
|
* );
|
|
23
23
|
* }
|
package/dist/hooks/useActor.js
CHANGED
|
@@ -167,7 +167,7 @@ const useActor = (config) => {
|
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
if (!candidAdapter) {
|
|
170
|
-
throw new Error("CandidAdapter is necessary to fetch the Candid interface. Please ensure your application is wrapped with the CandidAdapterProvider
|
|
170
|
+
throw new Error("CandidAdapter is necessary to fetch the Candid interface. Please ensure your application is wrapped with the CandidAdapterProvider, or provide the idlFactory directly.");
|
|
171
171
|
}
|
|
172
172
|
let idlFactory;
|
|
173
173
|
if (candidString) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ic-reactor/react",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"description": "A React library for interacting with Internet Computer canisters",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"node": ">=10"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ic-reactor/core": "^1.7.
|
|
38
|
+
"@ic-reactor/core": "^1.7.4",
|
|
39
39
|
"zustand-utils": "^1.3"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"react": ">=16.8",
|
|
48
48
|
"zustand": "4.5"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "b29be90830729f198c63164041141e35ee0aaafa"
|
|
51
51
|
}
|