visuddhinanda 3 лет назад
Родитель
Сommit
d322bb516d
1 измененных файлов с 9 добавлено и 5 удалено
  1. 9 5
      dashboard/src/pages/library/dict/recent.tsx

+ 9 - 5
dashboard/src/pages/library/dict/recent.tsx

@@ -1,17 +1,21 @@
 import { useNavigate } from "react-router-dom";
-import { Layout, Affix, Col, Row } from "antd";
-import { Input } from "antd";
+import { Layout, Col, Row } from "antd";
 import Dictionary from "../../../components/dict/Dictionary";
 
-const { Content, Header } = Layout;
-const { Search } = Input;
+const { Content } = Layout;
 
 const Widget = () => {
   const navigate = useNavigate();
 
   return (
     <div>
-      <Dictionary />
+      <Dictionary
+        onSearch={(value: string, isFactor?: boolean) => {
+          if (!isFactor) {
+            navigate("/dict/" + value);
+          }
+        }}
+      />
       <Content>
         <Row>
           <Col flex="auto"></Col>