From 4b174e272daaee9a5bf85aa2890904ff015589f8 Mon Sep 17 00:00:00 2001 From: Hailey Date: Wed, 19 Jun 2024 20:19:37 -0700 Subject: [PATCH] fix android onboard --- src/lib/strings/starter-pack.ts | 4 +--- src/state/shell/logged-out.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/strings/starter-pack.ts b/src/lib/strings/starter-pack.ts index 90c961ab82..eec7301220 100644 --- a/src/lib/strings/starter-pack.ts +++ b/src/lib/strings/starter-pack.ts @@ -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 } diff --git a/src/state/shell/logged-out.tsx b/src/state/shell/logged-out.tsx index 555a399ae7..dc78d03d5d 100644 --- a/src/state/shell/logged-out.tsx +++ b/src/state/shell/logged-out.tsx @@ -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({ showLoggedOut: shouldShowStarterPack, - requestedAccountSwitchTo: shouldShowStarterPack ? 'starterpack' : undefined, + requestedAccountSwitchTo: shouldShowStarterPack + ? isWeb + ? 'starterpack' + : 'new' + : undefined, }) const controls = React.useMemo(