aboutsummaryrefslogtreecommitdiff
path: root/src/components/common/Avatar.tsx
blob: 46a3814c05a3d3e441f9573ce2d1da955f5f2fe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import React, {FC} from 'react';
import {Image, ImageStyle, StyleProp, ImageBackground} from 'react-native';

type AvatarProps = {
  style: StyleProp<ImageStyle>;
  uri: string | undefined;
  // loading: boolean;
  // loadingStyle: StyleProp<ImageStyle> | undefined;
};
const Avatar: FC<AvatarProps> = ({
  style,
  uri,
  // loading = false,
  // loadingStyle,
}) => {
  return (
    // <ImageBackground
    //   style={style}
    //   defaultSource={require('../../assets/images/avatar-placeholder.png')}
    //   source={{uri, cache: 'reload'}}>
    //   {loading && (
    <Image
      defaultSource={require('../../assets/images/avatar-placeholder.png')}
      source={{uri, cache: 'reload'}}
      style={style}
    />
    //   )}
    // </ImageBackground>
  );
};

export default Avatar;