Jelajahi Sumber

add TypePage

visuddhinanda 2 tahun lalu
induk
melakukan
a93daf778a
1 mengubah file dengan 12 tambahan dan 0 penghapusan
  1. 12 0
      dashboard/src/components/article/Article.tsx

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

@@ -4,6 +4,7 @@ import TypeAnthology from "./TypeAnthology";
 import TypeTerm from "./TypeTerm";
 import TypePali from "./TypePali";
 import "./article.css";
+import TypePage from "./TypePage";
 
 export type ArticleMode = "read" | "edit" | "wbw";
 export type ArticleType =
@@ -133,6 +134,17 @@ const ArticleWidget = ({
             }
           }}
         />
+      ) : type === "page" ? (
+        <TypePage
+          articleId={articleId}
+          channelId={channelId}
+          mode={mode}
+          onArticleChange={(type: ArticleType, id: string) => {
+            if (typeof onArticleChange !== "undefined") {
+              onArticleChange(type, id);
+            }
+          }}
+        />
       ) : (
         <></>
       )}