blob: 732732989084b0f82c16cb832d682bea2f26eecf (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 | import React from "react";
import { useAvatar } from "@/services/user";
import BlobImage from "../BlobImage";
export interface UserAvatarProps
  extends React.ImgHTMLAttributes<HTMLImageElement> {
  username: string;
}
const UserAvatar: React.FC<UserAvatarProps> = ({ username, ...otherProps }) => {
  const avatar = useAvatar(username);
  return <BlobImage blob={avatar} {...otherProps} />;
};
export default UserAvatar;
 |