Browse Source

:sparkles: TypeSeries

visuddhinanda 2 năm trước cách đây
mục cha
commit
d2fd3d423f

+ 16 - 0
dashboard/src/components/article/Article.tsx

@@ -10,6 +10,7 @@ import { ISearchParams } from "../../pages/library/article/show";
 import TypeCourse from "./TypeCourse";
 import TypeCourse from "./TypeCourse";
 import { useEffect, useState } from "react";
 import { useEffect, useState } from "react";
 import { fullUrl } from "../../utils";
 import { fullUrl } from "../../utils";
+import TypeSeries from "./TypeSeries";
 
 
 export type ArticleMode = "read" | "edit" | "wbw";
 export type ArticleMode = "read" | "edit" | "wbw";
 export type ArticleType =
 export type ArticleType =
@@ -184,6 +185,21 @@ const ArticleWidget = ({
             }
             }
           }}
           }}
         />
         />
+      ) : type === "series" ? (
+        <TypeSeries
+          articleId={onArticleChange ? articleId : currId}
+          channelId={channelId}
+          onArticleChange={(
+            type: ArticleType,
+            id: string,
+            target: string,
+            param: ISearchParams[]
+          ) => {
+            if (typeof onArticleChange !== "undefined") {
+              onArticleChange(type, id, target, param);
+            }
+          }}
+        />
       ) : type === "page" ? (
       ) : type === "page" ? (
         <TypePage
         <TypePage
           articleId={onArticleChange ? articleId : currId}
           articleId={onArticleChange ? articleId : currId}