Skip to content

Commit

Permalink
Merge pull request #751 from shoutem/feature/update-share-button
Browse files Browse the repository at this point in the history
Update ShareButton
  • Loading branch information
Definitely-Not-Vlad authored Oct 4, 2022
2 parents d98a911 + 9af6d93 commit 8e95f3f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/ShareButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ShareButton extends PureComponent {
onShare() {
const { title, message, url } = this.props;

Share.share({
return Share.share({
title,
// URL property isn't supported on Android, so we are
// including it as the message for now.
Expand All @@ -34,7 +34,11 @@ class ShareButton extends PureComponent {
}

render() {
const { animationName, iconProps, ...otherProps } = this.props;
const { animationName, iconProps, url, ...otherProps } = this.props;

if (!url) {
return null;
}

return (
<Button onPress={this.onShare} {...otherProps}>
Expand Down

0 comments on commit 8e95f3f

Please sign in to comment.