From 8ebf9cc4b10a620d7698c1b0d0b316729c02dc13 Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Thu, 27 Jun 2024 21:44:26 -0700
Subject: Handle pushing to starterpack screen when unauthed (#4692)

---
 src/state/shell/logged-out.tsx | 20 --------------------
 1 file changed, 20 deletions(-)

(limited to 'src/state/shell/logged-out.tsx')

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) {
-- 
cgit 1.4.1

