Browse Source

channel id 从searchParam中提取

visuddhinanda 2 years ago
parent
commit
65e1a47971
1 changed files with 2 additions and 2 deletions
  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 channelId = id?.split("_").slice(1);
+
   let currMode: ArticleMode;
   if (searchParams.get("mode") !== null) {
     currMode = searchParams.get("mode") as ArticleMode;
@@ -331,7 +331,7 @@ const Widget = () => {
               curr={rightPanel}
               type={type as ArticleType}
               articleId={id ? id : ""}
-              selectedChannelKeys={channelId}
+              selectedChannelsId={searchParams.get("channel")?.split("_")}
               onClose={() => {
                 setRightPanel("close");
               }}