diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-01-25 15:33:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 15:33:23 -0800 |
commit | 5443503593a67cc7ff6e081ef9b1fe66ea0cbe0d (patch) | |
tree | 3a18e5a1b3a272c6ee7705dc6d64a9e17a23a9df /src/view/shell/createNativeStackNavigatorWithAuth.tsx | |
parent | 335bef3d308e6aff2238fc4820bd39c8f7517112 (diff) | |
download | voidsky-5443503593a67cc7ff6e081ef9b1fe66ea0cbe0d.tar.zst |
Add account-activation queueing to signup (#2613)
* Add deactivated-account tracking * Center button text * Add Deactivated screen * Add icon to Deactivated screen * Abort session resumption if the session is deactivated * Implement deactivated screen status checks * Bump api@0.9.5 * Use new typo-fixed scope * UI refinements
Diffstat (limited to 'src/view/shell/createNativeStackNavigatorWithAuth.tsx')
-rw-r--r-- | src/view/shell/createNativeStackNavigatorWithAuth.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/view/shell/createNativeStackNavigatorWithAuth.tsx b/src/view/shell/createNativeStackNavigatorWithAuth.tsx index 9fea6e49f..7e275502b 100644 --- a/src/view/shell/createNativeStackNavigatorWithAuth.tsx +++ b/src/view/shell/createNativeStackNavigatorWithAuth.tsx @@ -35,6 +35,7 @@ import { } from '#/state/shell/logged-out' import {useSession} from '#/state/session' import {isWeb} from 'platform/detection' +import {Deactivated} from '#/screens/Deactivated' import {LoggedOut} from '../com/auth/LoggedOut' import {Onboarding} from '../com/auth/Onboarding' @@ -92,7 +93,7 @@ function NativeStackNavigator({ ) // --- our custom logic starts here --- - const {hasSession} = useSession() + const {hasSession, currentAccount} = useSession() const activeRoute = state.routes[state.index] const activeDescriptor = descriptors[activeRoute.key] const activeRouteRequiresAuth = activeDescriptor.options.requireAuth ?? false @@ -103,6 +104,9 @@ function NativeStackNavigator({ if ((!PWI_ENABLED || activeRouteRequiresAuth) && !hasSession) { return <LoggedOut /> } + if (hasSession && currentAccount?.deactivated) { + return <Deactivated /> + } if (showLoggedOut) { return <LoggedOut onDismiss={() => setShowLoggedOut(false)} /> } |