aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views/timeline/TimelineInfoCard.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-13 16:35:39 +0800
committercrupest <crupest@outlook.com>2021-02-13 16:35:39 +0800
commitb9703104b5b416dd3211adedb878d1916072c96d (patch)
tree013269a755ca929705f5d26494dfea48bcf8383b /FrontEnd/src/app/views/timeline/TimelineInfoCard.tsx
parent17272858aaf09eac5a3550b23e97f8d339847bd9 (diff)
downloadtimeline-b9703104b5b416dd3211adedb878d1916072c96d.tar.gz
timeline-b9703104b5b416dd3211adedb878d1916072c96d.tar.bz2
timeline-b9703104b5b416dd3211adedb878d1916072c96d.zip
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline/TimelineInfoCard.tsx')
-rw-r--r--FrontEnd/src/app/views/timeline/TimelineInfoCard.tsx10
1 files changed, 3 insertions, 7 deletions
diff --git a/FrontEnd/src/app/views/timeline/TimelineInfoCard.tsx b/FrontEnd/src/app/views/timeline/TimelineInfoCard.tsx
index 920f504d..63da6f3c 100644
--- a/FrontEnd/src/app/views/timeline/TimelineInfoCard.tsx
+++ b/FrontEnd/src/app/views/timeline/TimelineInfoCard.tsx
@@ -1,12 +1,10 @@
import React from "react";
-import { useAvatar } from "@/services/user";
-
-import BlobImage from "../common/BlobImage";
import TimelineCardTemplate, {
TimelineCardTemplateProps,
} from "../timeline-common/TimelineCardTemplate";
import { TimelineCardComponentProps } from "../timeline-common/TimelinePageTemplateUI";
+import UserAvatar from "../common/user/UserAvatar";
export type OrdinaryTimelineManageItem = "delete";
@@ -16,8 +14,6 @@ const TimelineInfoCard: React.FC<TimelineInfoCardProps> = (props) => {
const { timeline, operations } = props;
const { onManage, onMember } = operations;
- const avatar = useAvatar(timeline?.owner?.username);
-
return (
<TimelineCardTemplate
infoArea={
@@ -27,8 +23,8 @@ const TimelineInfoCard: React.FC<TimelineInfoCardProps> = (props) => {
<small className="ml-3 text-secondary">{timeline.name}</small>
</h3>
<div className="align-middle">
- <BlobImage
- blob={avatar}
+ <UserAvatar
+ username={timeline.owner.username}
className="avatar small rounded-circle mr-3"
/>
{timeline.owner.nickname}