visuddhinanda 2 ani în urmă
părinte
comite
835340fb0b

+ 10 - 4
dashboard/src/components/course/CourseHead.tsx

@@ -48,7 +48,9 @@ const Widget = ({
                 <HomeOutlined />
               </Breadcrumb.Item>
               <Breadcrumb.Item>
-                <Link to="/course/list">课程</Link>
+                <Link to="/course/list">
+                  <Text>课程</Text>
+                </Link>
               </Breadcrumb.Item>
               <Breadcrumb.Item>{title}</Breadcrumb.Item>
             </Breadcrumb>
@@ -79,9 +81,13 @@ const Widget = ({
                 />
               </Space>
             </Space>
-            <div>
-              主讲人: <UserName {...teacher} />
-            </div>
+
+            <Space>
+              <Text>主讲人:</Text>{" "}
+              <Text>
+                <UserName {...teacher} />
+              </Text>
+            </Space>
           </Space>
         </Col>
         <Col flex="auto"></Col>

+ 6 - 7
dashboard/src/components/course/CourseIntro.tsx

@@ -1,7 +1,8 @@
 //课程详情简介
-import { Col, Row } from "antd";
-import { marked } from "marked";
+import { Col, Row, Typography } from "antd";
 
+import Marked from "../general/Marked";
+const { Paragraph } = Typography;
 interface IWidget {
   intro?: string;
 }
@@ -10,11 +11,9 @@ const Widget = ({ intro }: IWidget) => {
     <Row>
       <Col flex="auto"></Col>
       <Col flex="960px">
-        <div
-          dangerouslySetInnerHTML={{
-            __html: marked.parse(intro ? intro : ""),
-          }}
-        />
+        <Paragraph>
+          <Marked text={intro} />
+        </Paragraph>
       </Col>
       <Col flex="auto"></Col>
     </Row>

+ 1 - 1
dashboard/src/components/course/JoinCourse.tsx

@@ -144,7 +144,7 @@ const Widget = ({ courseId, joinMode, startAt, expRequest }: IWidget) => {
   }
   return (
     <div>
-      <span>{labelStatus}</span>
+      <Text>{labelStatus}</Text>
       {button}
     </div>
   );

+ 2 - 2
dashboard/src/pages/library/course/course.tsx

@@ -64,7 +64,7 @@ const Widget = () => {
     });
   }, [id]);
   return (
-    <div>
+    <>
       <CourseHead {...courseInfo} />
       <Divider />
       <CourseIntro {...courseInfo} />
@@ -73,7 +73,7 @@ const Widget = () => {
         anthologyId={courseInfo?.anthologyId}
         courseId={courseInfo?.id}
       />
-    </div>
+    </>
   );
 };
 

+ 9 - 8
dashboard/src/pages/library/course/index.tsx

@@ -2,16 +2,17 @@ import { Outlet } from "react-router-dom";
 
 import HeadBar from "../../../components/library/HeadBar";
 import FooterBar from "../../../components/library/FooterBar";
+import { Layout } from "antd";
 
 const Widget = () => {
-	// TODO
-	return (
-		<div>
-			<HeadBar selectedKeys="course" />
-			<Outlet />
-			<FooterBar />
-		</div>
-	);
+  // TODO
+  return (
+    <Layout>
+      <HeadBar selectedKeys="course" />
+      <Outlet />
+      <FooterBar />
+    </Layout>
+  );
 };
 
 export default Widget;