Browse Source

showName -> hideName

visuddhinanda 2 years ago
parent
commit
5a0fc68ca0

+ 8 - 8
dashboard/src/components/auth/Studio.tsx

@@ -11,15 +11,15 @@ export interface IStudio {
 }
 }
 interface IWidget {
 interface IWidget {
   data?: IStudio;
   data?: IStudio;
-  showAvatar?: boolean;
-  showName?: boolean;
+  hideAvatar?: boolean;
+  hideName?: boolean;
   popOver?: React.ReactNode;
   popOver?: React.ReactNode;
   onClick?: Function;
   onClick?: Function;
 }
 }
 const StudioWidget = ({
 const StudioWidget = ({
   data,
   data,
-  showAvatar = true,
-  showName = true,
+  hideAvatar = false,
+  hideName = false,
   popOver,
   popOver,
   onClick,
   onClick,
 }: IWidget) => {
 }: IWidget) => {
@@ -33,14 +33,14 @@ const StudioWidget = ({
           }
           }
         }}
         }}
       >
       >
-        {showAvatar ? (
+        {hideAvatar ? (
+          <></>
+        ) : (
           <Avatar size="small" src={data?.avatar}>
           <Avatar size="small" src={data?.avatar}>
             {data?.nickName?.slice(0, 2)}
             {data?.nickName?.slice(0, 2)}
           </Avatar>
           </Avatar>
-        ) : (
-          <></>
         )}
         )}
-        {showName ? data?.nickName : ""}
+        {hideName ? "" : data?.nickName}
       </Space>
       </Space>
     </StudioCard>
     </StudioCard>
   );
   );

+ 1 - 4
dashboard/src/components/channel/ChannelMy.tsx

@@ -377,10 +377,7 @@ const ChannelMy = ({
                       </Space>
                       </Space>
                       <Button type="link">
                       <Button type="link">
                         <Space>
                         <Space>
-                          <StudioName
-                            data={node.channel.studio}
-                            showName={false}
-                          />
+                          <StudioName data={node.channel.studio} hideName />
                           {node.channel.title}
                           {node.channel.title}
                         </Space>
                         </Space>
                       </Button>
                       </Button>

+ 1 - 1
dashboard/src/components/channel/ChannelPickerTable.tsx

@@ -336,7 +336,7 @@ const ChannelPickerTableWidget = ({
                       }}
                       }}
                     >
                     >
                       <Space>
                       <Space>
-                        <StudioName data={entity.studio} showName={false} />
+                        <StudioName data={entity.studio} hideName />
                         {entity.title}
                         {entity.title}
                       </Space>
                       </Space>
                     </Button>
                     </Button>

+ 1 - 1
dashboard/src/components/template/SentEdit/SentCell.tsx

@@ -291,7 +291,7 @@ const SentCellWidget = ({
             <div style={{ marginRight: 8 }}>
             <div style={{ marginRight: 8 }}>
               <StudioName
               <StudioName
                 data={sentData.studio}
                 data={sentData.studio}
-                showName={false}
+                hideName
                 popOver={
                 popOver={
                   compact ? <Details data={sentData} isPr={isPr} /> : undefined
                   compact ? <Details data={sentData} isPr={isPr} /> : undefined
                 }
                 }