@blocklet/discuss-kit 2.1.144 → 2.1.146
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const react = require("react");
|
|
4
|
+
const discussKitUx = require("@blocklet/discuss-kit-ux");
|
|
4
5
|
const request = require("../api");
|
|
5
6
|
const useTopicInfoSync = (options) => {
|
|
6
7
|
react.useEffect(() => {
|
|
@@ -12,7 +13,9 @@ const useTopicInfoSync = (options) => {
|
|
|
12
13
|
console.error(err);
|
|
13
14
|
});
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
+
if (!discussKitUx.utils.isInDiscussKitApp) {
|
|
17
|
+
sync();
|
|
18
|
+
}
|
|
16
19
|
}, []);
|
|
17
20
|
};
|
|
18
21
|
exports.useTopicInfoSync = useTopicInfoSync;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
|
+
import { utils } from "@blocklet/discuss-kit-ux";
|
|
2
3
|
import request from "../api";
|
|
3
4
|
const useTopicInfoSync = (options) => {
|
|
4
5
|
useEffect(() => {
|
|
@@ -10,7 +11,9 @@ const useTopicInfoSync = (options) => {
|
|
|
10
11
|
console.error(err);
|
|
11
12
|
});
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
+
if (!utils.isInDiscussKitApp) {
|
|
15
|
+
sync();
|
|
16
|
+
}
|
|
14
17
|
}, []);
|
|
15
18
|
};
|
|
16
19
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.146",
|
|
4
4
|
"description": "A react component for Discuss Kit blocklet.",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/es/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"author": "Nate <nate@arcblock.io> (http://github.com/NateRobinson)",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@arcblock/ws": "^1.19.
|
|
30
|
+
"@arcblock/ws": "^1.19.9",
|
|
31
31
|
"@blocklet/js-sdk": "^1.16.37",
|
|
32
32
|
"@dnd-kit/core": "^6.1.0",
|
|
33
33
|
"@dnd-kit/sortable": "^8.0.0",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"rehype-sanitize": "^5.0.1",
|
|
50
50
|
"timeago.js": "^4.0.2",
|
|
51
51
|
"url-join": "^4.0.1",
|
|
52
|
-
"@blocklet/discuss-kit-ux": "^2.1.
|
|
53
|
-
"@blocklet/editor": "^2.1.
|
|
52
|
+
"@blocklet/discuss-kit-ux": "^2.1.146",
|
|
53
|
+
"@blocklet/editor": "^2.1.146"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@arcblock/did-connect": "^2.10.36",
|