use real data in landing
This commit is contained in:
@@ -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 `/starter-pack/${starterPackOrName}/${rkey}`
|
||||
} else {
|
||||
const rkey = new AtUri(starterPackOrName.uri).rkey
|
||||
return makeProfileLink(starterPackOrName.creator, 'starter-pack', rkey)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ export type CommonNavigatorParams = {
|
||||
MessagesConversation: {conversation: string; embed?: string}
|
||||
MessagesSettings: undefined
|
||||
StarterPack: {name: string; rkey: string}
|
||||
StarterPackLanding: {id: string}
|
||||
StarterPackLanding: {name: string; rkey: string}
|
||||
StarterPackWizard: {
|
||||
mode: 'Create' | 'Edit'
|
||||
id?: string
|
||||
@@ -105,6 +105,7 @@ export type AllNavigatorParams = CommonNavigatorParams & {
|
||||
MessagesTab: undefined
|
||||
Messages: {animation?: 'push' | 'pop'}
|
||||
StarterPack: {name: string; rkey: string}
|
||||
StarterPackLanding: {name: string; rkey: string}
|
||||
StarterPackWizard: {
|
||||
mode: 'Create' | 'Edit'
|
||||
id?: string
|
||||
|
||||
Reference in New Issue
Block a user