visuddhinanda преди 2 години
родител
ревизия
81ab2f80ae
променени са 1 файла, в които са добавени 16 реда и са изтрити 0 реда
  1. 16 0
      dashboard/src/pages/library/article/show.tsx

+ 16 - 0
dashboard/src/pages/library/article/show.tsx

@@ -50,6 +50,7 @@ import SearchButton from "../../../components/general/SearchButton";
 import ToStudio from "../../../components/auth/ToStudio";
 import LoginAlertModal from "../../../components/auth/LoginAlertModal";
 import ShareButton from "../../../components/export/ShareButton";
+import ChannelAlert from "../../../components/channel/ChannelAlert";
 
 /**
  * type:
@@ -323,6 +324,21 @@ const Widget = () => {
             style={{ marginLeft: "auto", marginRight: "auto", width: 1100 }}
           >
             <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);
+              }}
+            />
             <Article
               active={true}
               type={type as ArticleType}