From 5443503593a67cc7ff6e081ef9b1fe66ea0cbe0d Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Thu, 25 Jan 2024 15:33:23 -0800 Subject: 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 --- src/view/shell/createNativeStackNavigatorWithAuth.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/view/shell/createNativeStackNavigatorWithAuth.tsx') 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 } + if (hasSession && currentAccount?.deactivated) { + return + } if (showLoggedOut) { return setShowLoggedOut(false)} /> } -- cgit 1.4.1