@blocklet/discuss-kit-post 2.4.122 → 2.4.124
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/dist/index.mjs +3 -3
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { LocaleProvider, useLocaleContext } from "@arcblock/ux/lib/Locale/contex
|
|
|
5
5
|
import { SessionContext } from "@arcblock/did-connect-react/lib/Session";
|
|
6
6
|
import { useContext, useState } from "react";
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
BlockletEditorViewer,
|
|
9
9
|
InternalThemeProvider,
|
|
10
10
|
UploaderProvider,
|
|
11
11
|
DefaultEditorConfigProvider,
|
|
@@ -29,7 +29,7 @@ function InternalPost({ postId, sx, readonly, ...rest }) {
|
|
|
29
29
|
} = useRequest(() => fetchPost(postId, locale), { refreshDeps: [postId, locale] });
|
|
30
30
|
const { plugin } = PostAutoTranslationContainer.useContainer();
|
|
31
31
|
if (loading) {
|
|
32
|
-
return
|
|
32
|
+
return BlockletEditorViewer.fallback;
|
|
33
33
|
}
|
|
34
34
|
if (!post) {
|
|
35
35
|
return null;
|
|
@@ -65,7 +65,7 @@ function InternalPost({ postId, sx, readonly, ...rest }) {
|
|
|
65
65
|
children: /* @__PURE__ */ jsx(EditIcon, {})
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
|
-
editable ? /* @__PURE__ */ jsx(PostEdit, { post, onSave: handleSave, onUpdate: handleUpdate, onCancel: () => setEditable(false) }) : /* @__PURE__ */ jsx(PostPaywall, { post, children: /* @__PURE__ */ jsx(
|
|
68
|
+
editable ? /* @__PURE__ */ jsx(PostEdit, { post, onSave: handleSave, onUpdate: handleUpdate, onCancel: () => setEditable(false) }) : /* @__PURE__ */ jsx(PostPaywall, { post, children: /* @__PURE__ */ jsx(BlockletEditorViewer, { content: post.content || "", prepend: plugin, enableHeadingsIdPlugin: true }) })
|
|
69
69
|
] }) }) }) }) });
|
|
70
70
|
}
|
|
71
71
|
export function Post(props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-post",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.124",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"ahooks": "^3.8.1",
|
|
21
21
|
"flat": "^5.0.2",
|
|
22
22
|
"ufo": "1.3.1",
|
|
23
|
-
"@blocklet/discuss-kit-ux": "2.4.
|
|
23
|
+
"@blocklet/discuss-kit-ux": "2.4.124"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@arcblock/did-connect-react": "^3.1.5",
|