use the correct link for sharing

This commit is contained in:
Hailey
2024-06-15 17:43:33 -07:00
parent 1d532916a2
commit 9a5e0185ab
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -46,9 +46,9 @@ export function makeStarterPackLink(
rkey?: string,
) {
if (typeof starterPackOrName === 'string') {
return `/start/${starterPackOrName}/${rkey}`
return `https://bsky.app/start/${starterPackOrName}/${rkey}`
} else {
const rkey = new AtUri(starterPackOrName.uri).rkey
return makeProfileLink(starterPackOrName.creator, 'starter-pack', rkey)
const uriRkey = new AtUri(starterPackOrName.uri).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 {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 {shareUrl} from 'lib/sharing'
import {isWeb} from 'platform/detection'
@@ -235,7 +235,7 @@ function Header({
label={_(msg`Share link`)}
testID="shareStarterPackLinkBtn"
onPress={() => {
shareUrl('https://bsky.app')
shareUrl(makeStarterPackLink(name, rkey))
}}>
<Menu.ItemText>
<Trans>Share link</Trans>