Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/mobile/src/utils/share.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Share } from 'react-native'
import Config from 'react-native-config'

// Docs for react native share: https://facebook.github.io/react-native/docs/share

Expand All @@ -8,9 +9,11 @@ type ShareProps = {
}

const share = async ({ message, url }: ShareProps) => {
const fullUrl = `${Config.AUDIUS_URL}${url}`

try {
// on iOS we can have both message and URL, on android, we need to concat
const context = { message: message ? `${message} ${url}` : url }
const context = { message: message ? `${message} ${fullUrl}` : fullUrl }
await Share.share(context)
} catch (error) {
console.error(error)
Expand Down