diff options
author | crupest <crupest@outlook.com> | 2021-02-13 21:23:30 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-13 21:23:30 +0800 |
commit | fe5128137f530daf8ca315cb89811121c6c2c9da (patch) | |
tree | 34cbdb7895e18d34779b2209a1e9aae0fde20cf2 /FrontEnd/src/app/views/common/user | |
parent | aeed3cb80d8c0a62d0ccc565733c4a213759c5bd (diff) | |
download | timeline-fe5128137f530daf8ca315cb89811121c6c2c9da.tar.gz timeline-fe5128137f530daf8ca315cb89811121c6c2c9da.tar.bz2 timeline-fe5128137f530daf8ca315cb89811121c6c2c9da.zip |
...
Diffstat (limited to 'FrontEnd/src/app/views/common/user')
-rw-r--r-- | FrontEnd/src/app/views/common/user/UserAvatar.tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/FrontEnd/src/app/views/common/user/UserAvatar.tsx b/FrontEnd/src/app/views/common/user/UserAvatar.tsx index 73273298..9e822528 100644 --- a/FrontEnd/src/app/views/common/user/UserAvatar.tsx +++ b/FrontEnd/src/app/views/common/user/UserAvatar.tsx @@ -1,8 +1,6 @@ import React from "react"; -import { useAvatar } from "@/services/user"; - -import BlobImage from "../BlobImage"; +import { getHttpUserClient } from "@/http/user"; export interface UserAvatarProps extends React.ImgHTMLAttributes<HTMLImageElement> { @@ -10,9 +8,12 @@ export interface UserAvatarProps } const UserAvatar: React.FC<UserAvatarProps> = ({ username, ...otherProps }) => { - const avatar = useAvatar(username); - - return <BlobImage blob={avatar} {...otherProps} />; + return ( + <img + src={getHttpUserClient().generateAvatarUrl(username)} + {...otherProps} + /> + ); }; export default UserAvatar; |