Explorar o código

我的studio 才显示 通用于此Studio

visuddhinanda %!s(int64=2) %!d(string=hai) anos
pai
achega
1bd2a335ec
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      dashboard/src/components/channel/ChannelSelect.tsx

+ 5 - 1
dashboard/src/components/channel/ChannelSelect.tsx

@@ -58,7 +58,11 @@ const ChannelSelectWidget = ({
               iterator.studio.nickName ? iterator.studio.nickName : ""
             );
           }
-          let channels: IOption[] = [{ value: "", label: "通用于此Studio" }];
+          let channels: IOption[] = [];
+          console.log("parentStudioId", parentStudioId);
+          if (user && user.id === parentStudioId) {
+            channels.push({ value: "", label: "通用于此Studio" });
+          }
           if (typeof parentChannelId === "string") {
             channels.push({ value: parentChannelId, label: "仅此版本" });
           }