Updated StatusSharePopover and navigator.canShare() functionality

• Updated:
- StatusSharePopover links and urls
- navigator.canShare() functionality in StatusContainer
This commit is contained in:
mgabdev
2020-10-24 21:58:48 -05:00
parent a8a83a70d6
commit 3dadf3d268
2 changed files with 22 additions and 12 deletions

View File

@@ -303,15 +303,14 @@ const mapDispatchToProps = (dispatch) => ({
},
onShare (targetRef, status) {
if (!!navigator && navigator.share) {
console.log("CAN SHARE")
if (!!navigator && navigator.share && navigator.canShare()) {
const url = status.get('url')
navigator.share({
url,
title: 'Test title',
text: 'Check out gab',
title: 'Check out this post on Gab',
text: 'Check out this post on Gab',
}).then(() => {
console.log('Successful share')
//
}).catch((error) => {
console.log('Error sharing', error)
})