|
|
@@ -7,6 +7,7 @@ import "./article.css";
|
|
|
import TypePage from "./TypePage";
|
|
|
import TypeCSPara from "./TypeCSPara";
|
|
|
import { ISearchParams } from "../../pages/library/article/show";
|
|
|
+import TypeCourse from "./TypeCourse";
|
|
|
|
|
|
export type ArticleMode = "read" | "edit" | "wbw";
|
|
|
export type ArticleType =
|
|
|
@@ -48,7 +49,7 @@ interface IWidget {
|
|
|
book?: string | null;
|
|
|
para?: string | null;
|
|
|
anthologyId?: string | null;
|
|
|
- courseId?: string;
|
|
|
+ courseId?: string | null;
|
|
|
exerciseId?: string;
|
|
|
userName?: string;
|
|
|
active?: boolean;
|
|
|
@@ -187,6 +188,19 @@ const ArticleWidget = ({
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
|
+ ) : type === "textbook" ? (
|
|
|
+ <TypeCourse
|
|
|
+ type={type}
|
|
|
+ articleId={articleId}
|
|
|
+ channelId={channelId}
|
|
|
+ courseId={courseId}
|
|
|
+ mode={mode}
|
|
|
+ onArticleChange={(type: ArticleType, id: string, target: string) => {
|
|
|
+ if (typeof onArticleChange !== "undefined") {
|
|
|
+ onArticleChange(type, id, target);
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ />
|
|
|
) : (
|
|
|
<></>
|
|
|
)}
|