Skip to content

Commit

Permalink
Try to fix share
Browse files Browse the repository at this point in the history
  • Loading branch information
wrenhawth committed Jul 15, 2024
1 parent 24cc0a2 commit dda786c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/components/ShareStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,16 @@ export const ShareStep = (props: ShareStepProps) => {
variant="success"
style={{ justifySelf: 'center' }}
onClick={async () => {
if (navigator?.canShare?.()) {
await navigator.share({
url: shareUrl,
text: "Check out my song!",
title
})
const shareData = {
url: shareUrl,
text: "Check out my song!",
title
}
if (navigator?.canShare?.(shareData)) {
await navigator.share()
} else {
console.log(shareUrl)
navigator.clipboard.writeText(shareUrl)
}

}}>
<SlIcon name="send" slot="prefix"></SlIcon>Share
</SlButton>
Expand Down

0 comments on commit dda786c

Please sign in to comment.