Profile Settings
This commit is contained in:
@@ -28,7 +28,7 @@ const getName = async (key) => {
|
||||
}
|
||||
}
|
||||
|
||||
let ProfileCardHorizontal = ({ profileid, hideIcon, profileObj }) => {
|
||||
let ProfileCardHorizontal = ({ profileid, hideIcon, profileObj, skipFollow, skiptOnPress }) => {
|
||||
let [profile, setProfile] = useState(profileObj || {});
|
||||
const navigation = useNavigation();
|
||||
|
||||
@@ -54,13 +54,14 @@ let ProfileCardHorizontal = ({ profileid, hideIcon, profileObj }) => {
|
||||
let photoUrl = profile.profile?.photo ? 'https://social.emmint.com/' + profile.profile.photo : DefaultPhoto;
|
||||
|
||||
const onPress = () => {
|
||||
if(skiptOnPress) return 0;
|
||||
return navigation.navigate('Profile', { profileid: profile._id })
|
||||
}
|
||||
|
||||
return (
|
||||
<Card style={styles.content} mode="elevated">
|
||||
<Card.Content>
|
||||
<View style={{ flexDirection: "row" }}>
|
||||
<View style={{ flexDirection: "row", alignItems: "center" }}>
|
||||
<View onPress={onPress}>
|
||||
<Avatar.Image size={75} source={{ uri: photoUrl }} />
|
||||
</View>
|
||||
@@ -74,18 +75,20 @@ let ProfileCardHorizontal = ({ profileid, hideIcon, profileObj }) => {
|
||||
</View>
|
||||
|
||||
</View>
|
||||
<View style={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
right: 0,
|
||||
width: 50,
|
||||
height: 50,
|
||||
backgroundColor:"#ddd",
|
||||
borderRadius: 25,
|
||||
opacity: 0.7
|
||||
}}>
|
||||
<FollowButton profile={profile._id ? profile : { _id: profileid }} />
|
||||
</View>
|
||||
{skipFollow ? <></> :
|
||||
<View style={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
right: 0,
|
||||
width: 50,
|
||||
height: 50,
|
||||
backgroundColor:"#ddd",
|
||||
borderRadius: 25,
|
||||
opacity: 0.7
|
||||
}}>
|
||||
<FollowButton profile={profile._id ? profile : { _id: profileid }} />
|
||||
</View>
|
||||
}
|
||||
</Card.Content>
|
||||
</Card>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user