diff options
author | crupest <crupest@outlook.com> | 2020-08-04 02:31:59 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-04 02:31:59 +0800 |
commit | 89806d334fe2c7ef0ea8b3d12c74759e8e3ba860 (patch) | |
tree | 47b85b9bfb5026743a4a9984c5c24b8363e8a5af /Timeline/ClientApp/src/app/timeline/TimelineInfoCard.tsx | |
parent | ff94145165d6877e47db7ec11c4d3b802f6f3532 (diff) | |
download | timeline-89806d334fe2c7ef0ea8b3d12c74759e8e3ba860.tar.gz timeline-89806d334fe2c7ef0ea8b3d12c74759e8e3ba860.tar.bz2 timeline-89806d334fe2c7ef0ea8b3d12c74759e8e3ba860.zip |
...
Diffstat (limited to 'Timeline/ClientApp/src/app/timeline/TimelineInfoCard.tsx')
-rw-r--r-- | Timeline/ClientApp/src/app/timeline/TimelineInfoCard.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Timeline/ClientApp/src/app/timeline/TimelineInfoCard.tsx b/Timeline/ClientApp/src/app/timeline/TimelineInfoCard.tsx index c25b2376..ece7d38a 100644 --- a/Timeline/ClientApp/src/app/timeline/TimelineInfoCard.tsx +++ b/Timeline/ClientApp/src/app/timeline/TimelineInfoCard.tsx @@ -10,10 +10,11 @@ import { import { useTranslation } from 'react-i18next';
import { fromEvent } from 'rxjs';
-import { useAvatarUrl } from '../data/user';
+import { useAvatar } from '../data/user';
import { timelineVisibilityTooltipTranslationMap } from '../data/timeline';
import { TimelineCardComponentProps } from './TimelinePageTemplateUI';
+import BlobImage from '../common/BlobImage';
export type OrdinaryTimelineManageItem = 'delete';
@@ -26,7 +27,7 @@ const TimelineInfoCard: React.FC<TimelineInfoCardProps> = (props) => { const { t } = useTranslation();
- const avatarUrl = useAvatarUrl(props.timeline.owner.username);
+ const avatar = useAvatar(props.timeline.owner.username);
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const containerRef = React.useRef<HTMLDivElement>(null!);
@@ -60,8 +61,8 @@ const TimelineInfoCard: React.FC<TimelineInfoCardProps> = (props) => { {props.timeline.name}
</h3>
<div className="d-inline-block align-middle">
- <img
- src={avatarUrl}
+ <BlobImage
+ blob={avatar}
onLoad={notifyHeight}
className="avatar small rounded-circle"
/>
|