fix android onboard

This commit is contained in:
Hailey
2024-06-19 20:19:37 -07:00
parent dd519adb62
commit 4b174e272d
2 changed files with 7 additions and 4 deletions
+1 -3
View File
@@ -1,7 +1,5 @@
import {AtUri} from '@atproto/api'
import {makeStarterPackLink} from 'lib/routes/links'
export function createStarterPackLinkFromAndroidReferrer(
referrerQueryString: string,
): string | null {
@@ -20,7 +18,7 @@ export function createStarterPackLinkFromAndroidReferrer(
if (contentParts[0] !== 'starterpack') 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) {
return null
}
+6 -1
View File
@@ -1,5 +1,6 @@
import React from 'react'
import {isWeb} from 'platform/detection'
import {useSession} from 'state/session'
import {useActiveStarterPack} from 'state/shell/starter-pack'
@@ -51,7 +52,11 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
const shouldShowStarterPack = Boolean(activeStarterPack?.uri) && !hasSession
const [state, setState] = React.useState<State>({
showLoggedOut: shouldShowStarterPack,
requestedAccountSwitchTo: shouldShowStarterPack ? 'starterpack' : undefined,
requestedAccountSwitchTo: shouldShowStarterPack
? isWeb
? 'starterpack'
: 'new'
: undefined,
})
const controls = React.useMemo<Controls>(