diff options
author | Hailey <me@haileyok.com> | 2024-06-27 21:44:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-27 21:44:26 -0700 |
commit | 8ebf9cc4b10a620d7698c1b0d0b316729c02dc13 (patch) | |
tree | 29a0b7488e5f8a52ca8945885fe1f65ee2bf651b /src/state/shell | |
parent | 91c4aa7c2dc598dd5e2c828e44c0d2c94cf0967d (diff) | |
download | voidsky-8ebf9cc4b10a620d7698c1b0d0b316729c02dc13.tar.zst |
Handle pushing to starterpack screen when unauthed (#4692)
Diffstat (limited to 'src/state/shell')
-rw-r--r-- | src/state/shell/logged-out.tsx | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/state/shell/logged-out.tsx b/src/state/shell/logged-out.tsx index 2c577fdd2..dc78d03d5 100644 --- a/src/state/shell/logged-out.tsx +++ b/src/state/shell/logged-out.tsx @@ -50,7 +50,6 @@ export function Provider({children}: React.PropsWithChildren<{}>) { const activeStarterPack = useActiveStarterPack() const {hasSession} = useSession() const shouldShowStarterPack = Boolean(activeStarterPack?.uri) && !hasSession - const [state, setState] = React.useState<State>({ showLoggedOut: shouldShowStarterPack, requestedAccountSwitchTo: shouldShowStarterPack @@ -60,25 +59,6 @@ export function Provider({children}: React.PropsWithChildren<{}>) { : undefined, }) - const [prevActiveStarterPack, setPrevActiveStarterPack] = - React.useState(activeStarterPack) - if (activeStarterPack?.uri !== prevActiveStarterPack?.uri) { - setPrevActiveStarterPack(activeStarterPack) - if (activeStarterPack) { - setState(s => ({ - ...s, - showLoggedOut: true, - requestedAccountSwitchTo: 'starterpack', - })) - } else { - setState(s => ({ - ...s, - showLoggedOut: false, - requestedAccountSwitchTo: undefined, - })) - } - } - const controls = React.useMemo<Controls>( () => ({ setShowLoggedOut(show) { |