Starter Packs (#4332)
Co-authored-by: Dan Abramov <dan.abramov@gmail.com> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
parent
35f64535cb
commit
f089f45781
115 changed files with 6336 additions and 237 deletions
|
@ -1,3 +1,5 @@
|
|||
import {AppBskyGraphDefs, AtUri} from '@atproto/api'
|
||||
|
||||
import {isInvalidHandle} from 'lib/strings/handles'
|
||||
|
||||
export function makeProfileLink(
|
||||
|
@ -35,3 +37,18 @@ export function makeSearchLink(props: {query: string; from?: 'me' | string}) {
|
|||
props.query + (props.from ? ` from:${props.from}` : ''),
|
||||
)}`
|
||||
}
|
||||
|
||||
export function makeStarterPackLink(
|
||||
starterPackOrName:
|
||||
| AppBskyGraphDefs.StarterPackViewBasic
|
||||
| AppBskyGraphDefs.StarterPackView
|
||||
| string,
|
||||
rkey?: string,
|
||||
) {
|
||||
if (typeof starterPackOrName === 'string') {
|
||||
return `https://bsky.app/start/${starterPackOrName}/${rkey}`
|
||||
} else {
|
||||
const uriRkey = new AtUri(starterPackOrName.uri).rkey
|
||||
return `https://bsky.app/start/${starterPackOrName.creator.handle}/${uriRkey}`
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,12 @@ export type CommonNavigatorParams = {
|
|||
MessagesConversation: {conversation: string; embed?: string}
|
||||
MessagesSettings: undefined
|
||||
Feeds: undefined
|
||||
Start: {name: string; rkey: string}
|
||||
StarterPack: {name: string; rkey: string; new?: boolean}
|
||||
StarterPackWizard: undefined
|
||||
StarterPackEdit: {
|
||||
rkey?: string
|
||||
}
|
||||
}
|
||||
|
||||
export type BottomTabNavigatorParams = CommonNavigatorParams & {
|
||||
|
@ -93,6 +99,12 @@ export type AllNavigatorParams = CommonNavigatorParams & {
|
|||
Hashtag: {tag: string; author?: string}
|
||||
MessagesTab: undefined
|
||||
Messages: {animation?: 'push' | 'pop'}
|
||||
Start: {name: string; rkey: string}
|
||||
StarterPack: {name: string; rkey: string; new?: boolean}
|
||||
StarterPackWizard: undefined
|
||||
StarterPackEdit: {
|
||||
rkey?: string
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue