fix android onboard
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
import {AtUri} from '@atproto/api'
|
import {AtUri} from '@atproto/api'
|
||||||
|
|
||||||
import {makeStarterPackLink} from 'lib/routes/links'
|
|
||||||
|
|
||||||
export function createStarterPackLinkFromAndroidReferrer(
|
export function createStarterPackLinkFromAndroidReferrer(
|
||||||
referrerQueryString: string,
|
referrerQueryString: string,
|
||||||
): string | null {
|
): string | null {
|
||||||
@@ -20,7 +18,7 @@ export function createStarterPackLinkFromAndroidReferrer(
|
|||||||
if (contentParts[0] !== 'starterpack') return null
|
if (contentParts[0] !== 'starterpack') return null
|
||||||
if (contentParts.length !== 3) return null
|
if (contentParts.length !== 3) return null
|
||||||
|
|
||||||
return makeStarterPackLink(contentParts[1], contentParts[2])
|
return `at://${contentParts[1]}/app.bsky.graph.starterpack/${contentParts[2]}`
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
|
import {isWeb} from 'platform/detection'
|
||||||
import {useSession} from 'state/session'
|
import {useSession} from 'state/session'
|
||||||
import {useActiveStarterPack} from 'state/shell/starter-pack'
|
import {useActiveStarterPack} from 'state/shell/starter-pack'
|
||||||
|
|
||||||
@@ -51,7 +52,11 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
|||||||
const shouldShowStarterPack = Boolean(activeStarterPack?.uri) && !hasSession
|
const shouldShowStarterPack = Boolean(activeStarterPack?.uri) && !hasSession
|
||||||
const [state, setState] = React.useState<State>({
|
const [state, setState] = React.useState<State>({
|
||||||
showLoggedOut: shouldShowStarterPack,
|
showLoggedOut: shouldShowStarterPack,
|
||||||
requestedAccountSwitchTo: shouldShowStarterPack ? 'starterpack' : undefined,
|
requestedAccountSwitchTo: shouldShowStarterPack
|
||||||
|
? isWeb
|
||||||
|
? 'starterpack'
|
||||||
|
: 'new'
|
||||||
|
: undefined,
|
||||||
})
|
})
|
||||||
|
|
||||||
const controls = React.useMemo<Controls>(
|
const controls = React.useMemo<Controls>(
|
||||||
|
|||||||
Reference in New Issue
Block a user