From 37b37f296a59aea43e73f615ae6cb042b2242e87 Mon Sep 17 00:00:00 2001 From: Brian Kim Date: Fri, 14 May 2021 19:33:03 -0700 Subject: Bug fixes --- src/components/common/Avatar.tsx | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'src/components/common/Avatar.tsx') diff --git a/src/components/common/Avatar.tsx b/src/components/common/Avatar.tsx index 831cf906..86ebedf3 100644 --- a/src/components/common/Avatar.tsx +++ b/src/components/common/Avatar.tsx @@ -1,17 +1,30 @@ import React, {FC} from 'react'; -import {Image, ImageStyle, StyleProp} from 'react-native'; +import {Image, ImageStyle, StyleProp, ImageBackground} from 'react-native'; type AvatarProps = { style: StyleProp; uri: string | undefined; + loading: boolean; + loadingStyle: StyleProp | undefined; }; -const Avatar: FC = ({style, uri}) => { +const Avatar: FC = ({ + style, + uri, + loading = false, + loadingStyle, +}) => { return ( - + source={{uri, cache: 'reload'}}> + {loading && ( + + )} + ); }; -- cgit v1.2.3-70-g09d2