aboutsummaryrefslogtreecommitdiff
path: root/src/components/search
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/search')
-rw-r--r--src/components/search/ExploreSectionUser.tsx12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/components/search/ExploreSectionUser.tsx b/src/components/search/ExploreSectionUser.tsx
index d8c92be2..c1355e17 100644
--- a/src/components/search/ExploreSectionUser.tsx
+++ b/src/components/search/ExploreSectionUser.tsx
@@ -15,6 +15,7 @@ import {loadImageFromURL} from '../../services';
import {RootState} from '../../store/rootReducer';
import {ProfilePreviewType, ScreenType} from '../../types';
import {fetchUserX, normalize, userXInStore} from '../../utils';
+import {Avatar} from '../common';
/**
* Search Screen for user recommendations and a search
@@ -30,7 +31,7 @@ const ExploreSectionUser: React.FC<ExploreSectionUserProps> = ({
externalStyles,
}) => {
const {id, username, first_name, last_name} = user;
- const [avatar, setAvatar] = useState<string | null>(null);
+ const [avatar, setAvatar] = useState<string>();
const navigation = useNavigation();
const {user: loggedInUser} = useSelector((state: RootState) => state.user);
const state: RootState = useStore().getState();
@@ -71,14 +72,7 @@ const ExploreSectionUser: React.FC<ExploreSectionUserProps> = ({
angle={90}
angleCenter={{x: 0.5, y: 0.5}}
style={styles.gradient}>
- <Image
- source={
- avatar
- ? {uri: avatar}
- : require('../../assets/images/avatar-placeholder.png')
- }
- style={styles.profile}
- />
+ <Avatar style={styles.profile} uri={avatar} />
</LinearGradient>
<Text style={[styles.name, externalStyles?.name]} numberOfLines={2}>
{first_name} {last_name}