Преглед изворни кода

channel id 从searchParam中提取

visuddhinanda пре 2 година
родитељ
комит
65e1a47971
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      dashboard/src/pages/library/article/show.tsx

+ 2 - 2
dashboard/src/pages/library/article/show.tsx

@@ -105,7 +105,7 @@ const Widget = () => {
     });
     });
   }, []);
   }, []);
   const rightBarWidth = "48px";
   const rightBarWidth = "48px";
-  const channelId = id?.split("_").slice(1);
+
   let currMode: ArticleMode;
   let currMode: ArticleMode;
   if (searchParams.get("mode") !== null) {
   if (searchParams.get("mode") !== null) {
     currMode = searchParams.get("mode") as ArticleMode;
     currMode = searchParams.get("mode") as ArticleMode;
@@ -331,7 +331,7 @@ const Widget = () => {
               curr={rightPanel}
               curr={rightPanel}
               type={type as ArticleType}
               type={type as ArticleType}
               articleId={id ? id : ""}
               articleId={id ? id : ""}
-              selectedChannelKeys={channelId}
+              selectedChannelsId={searchParams.get("channel")?.split("_")}
               onClose={() => {
               onClose={() => {
                 setRightPanel("close");
                 setRightPanel("close");
               }}
               }}