use the correct link for sharing
This commit is contained in:
@@ -46,9 +46,9 @@ export function makeStarterPackLink(
|
|||||||
rkey?: string,
|
rkey?: string,
|
||||||
) {
|
) {
|
||||||
if (typeof starterPackOrName === 'string') {
|
if (typeof starterPackOrName === 'string') {
|
||||||
return `/start/${starterPackOrName}/${rkey}`
|
return `https://bsky.app/start/${starterPackOrName}/${rkey}`
|
||||||
} else {
|
} else {
|
||||||
const rkey = new AtUri(starterPackOrName.uri).rkey
|
const uriRkey = new AtUri(starterPackOrName.uri).rkey
|
||||||
return makeProfileLink(starterPackOrName.creator, 'starter-pack', rkey)
|
return `https://bsky.app/start/${starterPackOrName.creator.handle}/${uriRkey}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {useNavigation} from '@react-navigation/native'
|
|||||||
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||||
import {useQueryClient} from '@tanstack/react-query'
|
import {useQueryClient} from '@tanstack/react-query'
|
||||||
|
|
||||||
import {makeProfileLink} from 'lib/routes/links'
|
import {makeProfileLink, makeStarterPackLink} from 'lib/routes/links'
|
||||||
import {CommonNavigatorParams, NavigationProp} from 'lib/routes/types'
|
import {CommonNavigatorParams, NavigationProp} from 'lib/routes/types'
|
||||||
import {shareUrl} from 'lib/sharing'
|
import {shareUrl} from 'lib/sharing'
|
||||||
import {isWeb} from 'platform/detection'
|
import {isWeb} from 'platform/detection'
|
||||||
@@ -235,7 +235,7 @@ function Header({
|
|||||||
label={_(msg`Share link`)}
|
label={_(msg`Share link`)}
|
||||||
testID="shareStarterPackLinkBtn"
|
testID="shareStarterPackLinkBtn"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
shareUrl('https://bsky.app')
|
shareUrl(makeStarterPackLink(name, rkey))
|
||||||
}}>
|
}}>
|
||||||
<Menu.ItemText>
|
<Menu.ItemText>
|
||||||
<Trans>Share link</Trans>
|
<Trans>Share link</Trans>
|
||||||
|
|||||||
Reference in New Issue
Block a user