import React, {FC} from 'react';
import {Image, ImageStyle, StyleProp} from 'react-native';

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

export default Avatar;
