aboutsummaryrefslogtreecommitdiff
path: root/src/components/common/Avatar.tsx
blob: 831cf906b215d91743cb32d0a09c0c97ee08e384 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;