Przeglądaj źródła

UserName -> User

visuddhinanda 1 rok temu
rodzic
commit
4b682e63ee

+ 1 - 2
dashboard/src/components/corpus/SentHistory.tsx

@@ -2,8 +2,7 @@ import { ProList } from "@ant-design/pro-components";
 import { Space, Typography } from "antd";
 
 import { get } from "../../request";
-import User from "../auth/User";
-import { IUser } from "../auth/UserName";
+import User, { IUser } from "../auth/User";
 import TimeShow from "../general/TimeShow";
 import { IChannel } from "../channel/Channel";
 import { MergeIcon2 } from "../../assets/icon";

+ 2 - 2
dashboard/src/components/course/CourseHead.tsx

@@ -5,11 +5,11 @@ import { Typography } from "antd";
 import { HomeOutlined } from "@ant-design/icons";
 
 import { API_HOST } from "../../request";
-import UserName from "../auth/UserName";
 import { ICourseDataResponse } from "../api/Course";
 import { useIntl } from "react-intl";
 import Status from "./Status";
 import moment from "moment";
+import User from "../auth/User";
 
 const { Title, Text } = Typography;
 
@@ -112,7 +112,7 @@ const CourseHeadWidget = ({ data }: IWidget) => {
             <Space>
               <Text>主讲人:</Text>{" "}
               <Text>
-                <UserName {...data?.teacher} />
+                <User {...data?.teacher} showAvatar={false} />
               </Text>
             </Space>
           </Space>

+ 2 - 3
dashboard/src/components/share/Collaborator.tsx

@@ -12,11 +12,10 @@ import {
   IShareResponse,
   IShareUpdateRequest,
 } from "../api/Share";
-import { IUser } from "../auth/User";
+import User, { IUser } from "../auth/User";
 import { TRole } from "../api/Auth";
 
 import Group, { IGroup } from "../group/Group";
-import UserName from "../auth/UserName";
 
 interface ICollaborator {
   sn?: number;
@@ -120,7 +119,7 @@ const CollaboratorWidget = ({ resId, load = false, onReload }: IWidget) => {
         title: {
           render: (text, row, index, action) => {
             return row.user ? (
-              <UserName {...row.user} key={index} />
+              <User {...row.user} showAvatar={false} key={index} />
             ) : (
               <Group group={row.group} key={index} />
             );