فهرست منبع

:fire: showTitle

visuddhinanda 3 سال پیش
والد
کامیت
b838770644
2فایلهای تغییر یافته به همراه3 افزوده شده و 10 حذف شده
  1. 1 5
      dashboard/src/components/article/AnthologyDetail.tsx
  2. 2 5
      dashboard/src/components/general/TimeShow.tsx

+ 1 - 5
dashboard/src/components/article/AnthologyDetail.tsx

@@ -64,11 +64,7 @@ const Widget = ({ aid, channels, onArticleSelect }: IWidgetAnthologyDetail) => {
       </div>
       </div>
       <Space>
       <Space>
         <StudioName data={tableData?.studio} />
         <StudioName data={tableData?.studio} />
-        <TimeShow
-          time={tableData?.updated_at}
-          title="updated"
-          showTitle={true}
-        />
+        <TimeShow time={tableData?.updated_at} title="updated" />
       </Space>
       </Space>
       <div>
       <div>
         <Marked text={tableData?.summary} />
         <Marked text={tableData?.summary} />

+ 2 - 5
dashboard/src/components/general/TimeShow.tsx

@@ -4,15 +4,13 @@ import { FieldTimeOutlined } from "@ant-design/icons";
 
 
 interface IWidgetTimeShow {
 interface IWidgetTimeShow {
   showIcon?: boolean;
   showIcon?: boolean;
-  showTitle?: boolean;
   showTooltip?: boolean;
   showTooltip?: boolean;
   time?: string;
   time?: string;
-  title: string;
+  title?: string;
 }
 }
 
 
 const Widget = ({
 const Widget = ({
   showIcon = true,
   showIcon = true,
-  showTitle = false,
   showTooltip = true,
   showTooltip = true,
   time,
   time,
   title,
   title,
@@ -22,7 +20,6 @@ const Widget = ({
     return <></>;
     return <></>;
   }
   }
   const icon = showIcon ? <FieldTimeOutlined /> : <></>;
   const icon = showIcon ? <FieldTimeOutlined /> : <></>;
-  const strTitle = showTitle ? title : "";
 
 
   const passTime: string = getPassDataTime(time);
   const passTime: string = getPassDataTime(time);
   const tooltip: string = getFullDataTime(time);
   const tooltip: string = getFullDataTime(time);
@@ -83,7 +80,7 @@ const Widget = ({
     <Tooltip title={tooltip} color={color} key={color}>
     <Tooltip title={tooltip} color={color} key={color}>
       <Space>
       <Space>
         {icon}
         {icon}
-        {strTitle}
+        {title}
         {passTime}
         {passTime}
       </Space>
       </Space>
     </Tooltip>
     </Tooltip>