23 lines
925 B
JavaScript
23 lines
925 B
JavaScript
import React, { useState, useEffect } from 'react';
|
|
import { Text } from 'react-native';
|
|
import { Avatar, IconButton, Card, Title, Paragraph } from 'react-native-paper';
|
|
import UserName from './UserName';
|
|
|
|
const DefaultPhoto = "https://social.emmint.com/uploads/e6f9be6d665dc43417701bf16a90122c.png";
|
|
|
|
const ProfileSmallHeader = ({ profileObj }) => {
|
|
let photoUrl = profileObj.profile.photo ? 'https://social.emmint.com/' + profileObj.profile.photo : DefaultPhoto;
|
|
return (
|
|
<>
|
|
<Card.Title
|
|
title={<UserName profileid={profileObj._id} hideIcon={true} />}
|
|
subtitle={profileObj.profile.description}
|
|
left={(props) => <Avatar.Image {...props} source={{ uri: photoUrl}} />}
|
|
right={(props) => <IconButton {...props} icon="more-vert" onPress={() => { }} />}
|
|
/>
|
|
</>
|
|
);
|
|
|
|
}
|
|
|
|
export default React.memo(ProfileSmallHeader); |