Add sharing button logics

This commit is contained in:
Adolfo Reyna
2023-03-10 20:06:29 -06:00
parent f2a0545f48
commit 21f987a5a5
2 changed files with 28 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react';
import { View } from 'react-native';
import { View, Share } from 'react-native';
import { Avatar, Button, Card, Title, Paragraph } from 'react-native-paper';
import UserName from './UserName';
import FollowButton from './basics/FollowButton';
@@ -15,10 +15,10 @@ const ProfileHeader = ({ profileObj }) => {
height: 300
}} />
<Card.Content style={{}}>
<Title style={{position: "absolute", top: -60, left: 10, backgroundColor: "rgba(255,255,255,0.4)", padding: 10}}>
<Title style={{ position: "absolute", top: -60, left: 10, backgroundColor: "rgba(255,255,255,0.4)", padding: 10 }}>
<UserName profileid={profileObj._id} />
</Title>
<Paragraph style={{paddingTop:10}}>{profileObj.profile.description}</Paragraph>
<Paragraph style={{ paddingTop: 10 }}>{profileObj.profile.description}</Paragraph>
<View style={{
position: "absolute",
top: -290,
@@ -31,6 +31,23 @@ const ProfileHeader = ({ profileObj }) => {
}}>
<FollowButton profile={profileObj} />
</View>
<View style={{
position: "absolute",
top: -290,
right: 80,
width: 50,
height: 50,
backgroundColor: "#ddd",
borderRadius: 25,
opacity: 0.7
}}>
<Button icon="ios-share" labelStyle={{ fontSize: 24, paddingTop:10 }} onPress={() => {
Share.share({
message: "https://social.emmint.com/feed/" + profileObj._id,
title: profileObj.profile.firstName + " " + profileObj.profile.lastName
});
}}></Button>
</View>
</Card.Content>
</Card>
{/*