diff --git a/src/components/ShareStep.tsx b/src/components/ShareStep.tsx index f2d0687..09ddc5e 100644 --- a/src/components/ShareStep.tsx +++ b/src/components/ShareStep.tsx @@ -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) } - }}> Share