Browse Source

textbook 不显示版本选择提示

visuddhinanda 2 years ago
parent
commit
541b28c988
1 changed files with 20 additions and 15 deletions
  1. 20 15
      dashboard/src/pages/library/article/show.tsx

+ 20 - 15
dashboard/src/pages/library/article/show.tsx

@@ -332,21 +332,26 @@ const Widget = () => {
             style={{ marginLeft: "auto", marginRight: "auto", width: 1100 }}
             style={{ marginLeft: "auto", marginRight: "auto", width: 1100 }}
           >
           >
             <LoginAlertModal mode={currMode} />
             <LoginAlertModal mode={currMode} />
-            <ChannelAlert
-              channels={searchParams.get("channel")}
-              onChannelChange={(channels: IChannel[]) => {
-                let output: any = {
-                  channel: channels.map((item) => item.id).join("_"),
-                };
-                searchParams.forEach((value, key) => {
-                  console.log(value, key);
-                  if (key !== "channel") {
-                    output[key] = value;
-                  }
-                });
-                setSearchParams(output);
-              }}
-            />
+            {type !== "textbook" ? (
+              <ChannelAlert
+                channels={searchParams.get("channel")}
+                onChannelChange={(channels: IChannel[]) => {
+                  let output: any = {
+                    channel: channels.map((item) => item.id).join("_"),
+                  };
+                  searchParams.forEach((value, key) => {
+                    console.log(value, key);
+                    if (key !== "channel") {
+                      output[key] = value;
+                    }
+                  });
+                  setSearchParams(output);
+                }}
+              />
+            ) : (
+              <></>
+            )}
+
             <Article
             <Article
               active={true}
               active={true}
               type={type as ArticleType}
               type={type as ArticleType}