visuddhinanda 2 лет назад
Родитель
Сommit
0f994893d2
1 измененных файлов с 23 добавлено и 1 удалено
  1. 23 1
      dashboard/src/components/article/RightPanel.tsx

+ 23 - 1
dashboard/src/components/article/RightPanel.tsx

@@ -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>