aboutsummaryrefslogtreecommitdiff
path: root/src/components/common/AvatarTitle.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-05-04 13:31:17 -0400
committerGitHub <noreply@github.com>2021-05-04 13:31:17 -0400
commit1441ef007549f24a292317f1e67c0de63cacbd2b (patch)
tree1b1fe4a21f257c468c321d49804f124c98a6e6b6 /src/components/common/AvatarTitle.tsx
parent5a8d92bcd869ada1079bc36b6598c899a8a9246d (diff)
parent64dedc2bc0c65fae604ba771ae4c17d1927ff1c2 (diff)
Merge pull request #392 from IvanIFChen/tma791-remove-profile-photo-requirement
[TMA-791] Removed profile photo requirement
Diffstat (limited to 'src/components/common/AvatarTitle.tsx')
-rw-r--r--src/components/common/AvatarTitle.tsx14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/components/common/AvatarTitle.tsx b/src/components/common/AvatarTitle.tsx
index 81351327..a2a7c0aa 100644
--- a/src/components/common/AvatarTitle.tsx
+++ b/src/components/common/AvatarTitle.tsx
@@ -1,10 +1,11 @@
import React from 'react';
-import {Image, StyleSheet, View} from 'react-native';
+import {StyleSheet, View} from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import {TAGGS_GRADIENT} from '../../constants';
+import Avatar from './Avatar';
type AvatarTitleProps = {
- avatar: string | null;
+ avatar: string | undefined;
};
const AvatarTitle: React.FC<AvatarTitleProps> = ({avatar}) => {
return (
@@ -16,14 +17,7 @@ const AvatarTitle: React.FC<AvatarTitleProps> = ({avatar}) => {
angleCenter={{x: 0.5, y: 0.5}}
style={styles.gradient}
/>
- <Image
- style={styles.avatar}
- source={
- avatar
- ? {uri: avatar}
- : require('../../assets/images/avatar-placeholder.png')
- }
- />
+ <Avatar style={styles.avatar} uri={avatar} />
</View>
);
};