Move Takendown and Deactivated screens out to the shell alongside AA (#9538)

This commit is contained in:
Eric Bailey
2025-12-11 13:28:50 -06:00
committed by GitHub
parent 8d5b1c83cc
commit d3923c1f2e
6 changed files with 152 additions and 149 deletions
+18 -7
View File
@@ -23,6 +23,8 @@ import {useCloseAnyActiveElement} from '#/state/util'
import {Lightbox} from '#/view/com/lightbox/Lightbox'
import {ModalsContainer} from '#/view/com/modals/Modal'
import {ErrorBoundary} from '#/view/com/util/ErrorBoundary'
import {Deactivated} from '#/screens/Deactivated'
import {Takendown} from '#/screens/Takendown'
import {atoms as a, select, useTheme} from '#/alf'
import {setSystemUITheme} from '#/alf/util/systemUI'
import {AgeAssuranceRedirectDialog} from '#/components/ageAssurance/AgeAssuranceRedirectDialog'
@@ -195,6 +197,7 @@ function DrawerLayout({children}: {children: React.ReactNode}) {
export function Shell() {
const t = useTheme()
const aa = useAgeAssurance()
const {currentAccount} = useSession()
const fullyExpandedCount = useDialogFullyExpandedCountContext()
useIntentHandler()
@@ -214,15 +217,23 @@ export function Shell() {
navigationBar: t.name !== 'light' ? 'light' : 'dark',
}}
/>
{aa.state.access === aa.Access.None ? (
<NoAccessScreen />
{currentAccount?.status === 'takendown' ? (
<Takendown />
) : currentAccount?.status === 'deactivated' ? (
<Deactivated />
) : (
<RoutesContainer>
<ShellInner />
</RoutesContainer>
)}
<>
{aa.state.access === aa.Access.None ? (
<NoAccessScreen />
) : (
<RoutesContainer>
<ShellInner />
</RoutesContainer>
)}
<RedirectOverlay />
<RedirectOverlay />
</>
)}
</View>
)
}