Ver Fonte

添加显示单个术语的link

visuddhinanda há 2 anos atrás
pai
commit
861a6f4035
1 ficheiros alterados com 4 adições e 2 exclusões
  1. 4 2
      dashboard/src/components/term/TermItem.tsx

+ 4 - 2
dashboard/src/components/term/TermItem.tsx

@@ -12,7 +12,7 @@ import TimeShow from "../general/TimeShow";
 import TermModal from "./TermModal";
 import { useState } from "react";
 import StudioName from "../auth/StudioName";
-import { useNavigate } from "react-router-dom";
+import { Link, useNavigate } from "react-router-dom";
 
 const { Text } = Typography;
 
@@ -29,7 +29,9 @@ const TermItemWidget = ({ data }: IWidget) => {
         title={
           <Space direction="vertical" size={3}>
             <Space>
-              <Text strong>{data?.meaning}</Text>
+              <Link to={`/term/show/${data?.guid}`}>
+                <Text strong>{data?.meaning}</Text>
+              </Link>
               <Text type="secondary">{data?.other_meaning}</Text>
             </Space>
             <Space style={{ fontSize: "80%" }}>