|
|
@@ -13,8 +13,15 @@ import store from "../../store";
|
|
|
import DiscussionBox from "../discussion/DiscussionBox";
|
|
|
import { show } from "../../reducers/discussion";
|
|
|
import { useIntl } from "react-intl";
|
|
|
+import SuggestionBox from "../template/SentEdit/SuggestionBox";
|
|
|
|
|
|
-export type TPanelName = "dict" | "channel" | "discussion" | "close" | "open";
|
|
|
+export type TPanelName =
|
|
|
+ | "dict"
|
|
|
+ | "channel"
|
|
|
+ | "discussion"
|
|
|
+ | "suggestion"
|
|
|
+ | "close"
|
|
|
+ | "open";
|
|
|
|
|
|
interface IWidget {
|
|
|
curr?: TPanelName;
|
|
|
@@ -76,6 +83,10 @@ const RightPanelWidget = ({
|
|
|
setOpen(true);
|
|
|
setActiveTab(curr);
|
|
|
break;
|
|
|
+ case "suggestion":
|
|
|
+ setOpen(true);
|
|
|
+ setActiveTab(curr);
|
|
|
+ break;
|
|
|
case "close":
|
|
|
setOpen(false);
|
|
|
break;
|
|
|
@@ -182,6 +193,17 @@ const RightPanelWidget = ({
|
|
|
</div>
|
|
|
),
|
|
|
},
|
|
|
+ {
|
|
|
+ label: intl.formatMessage({
|
|
|
+ id: "buttons.suggestion",
|
|
|
+ }),
|
|
|
+ key: "suggestion",
|
|
|
+ children: (
|
|
|
+ <div style={tabInnerStyle}>
|
|
|
+ <SuggestionBox />
|
|
|
+ </div>
|
|
|
+ ),
|
|
|
+ },
|
|
|
]}
|
|
|
/>
|
|
|
</div>
|