visuddhinanda 3 лет назад
Родитель
Сommit
df0f410021
1 измененных файлов с 9 добавлено и 7 удалено
  1. 9 7
      dashboard/src/components/channel/ChannelListItem.tsx

+ 9 - 7
dashboard/src/components/channel/ChannelListItem.tsx

@@ -1,21 +1,23 @@
 import { Space } from "antd";
 import { Avatar } from "antd";
 
-import type { ChannelInfoProps } from "../api/Channel";
+import type { IChannelApiData } from "../api/Channel";
+import { IStudio } from "../auth/StudioName";
 
-type IWidgetChannelListItem = {
-  data: ChannelInfoProps;
+interface IWidget {
+  channel: IChannelApiData;
+  studio: IStudio;
   showProgress?: boolean;
   showLike?: boolean;
-};
+}
 
-const Widget = ({ data, showProgress, showLike }: IWidgetChannelListItem) => {
-  const studioName = data.studioName.slice(0, 2);
+const Widget = ({ channel, studio, showProgress, showLike }: IWidget) => {
+  const studioName = studio.nickName.slice(0, 2);
   return (
     <>
       <Space>
         <Avatar size="small">{studioName}</Avatar>
-        {data.channelName}@{data.studioName}
+        {channel.name}
       </Space>
     </>
   );