aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/views/common/user/UserAvatar.tsx
blob: 901697dba8be0db02d5d8f3719db019add81fd10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import React from "react";

import { getHttpUserClient } from "http/user";

export interface UserAvatarProps
  extends React.ImgHTMLAttributes<HTMLImageElement> {
  username: string;
}

const UserAvatar: React.FC<UserAvatarProps> = ({ username, ...otherProps }) => {
  return (
    <img
      src={getHttpUserClient().generateAvatarUrl(username)}
      {...otherProps}
    />
  );
};

export default UserAvatar;