diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-08 09:04:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 09:04:06 -0800 |
commit | 4afed4be281b6319c328938e4ed757624a78b13c (patch) | |
tree | 7a7744801c2964a3981c3e3ed1772f8226276c6b /src/view/com/auth/withAuthRequired.tsx | |
parent | 3a211017d3d972fb442069e38d1b8ff1a2edbd57 (diff) | |
download | voidsky-4afed4be281b6319c328938e4ed757624a78b13c.tar.zst |
Move onboarding state to new persistence + reducer context (#1835)
Diffstat (limited to 'src/view/com/auth/withAuthRequired.tsx')
-rw-r--r-- | src/view/com/auth/withAuthRequired.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/view/com/auth/withAuthRequired.tsx b/src/view/com/auth/withAuthRequired.tsx index 25d12165f..898f81051 100644 --- a/src/view/com/auth/withAuthRequired.tsx +++ b/src/view/com/auth/withAuthRequired.tsx @@ -13,19 +13,21 @@ import {Onboarding} from './Onboarding' import {Text} from '../util/text/Text' import {usePalette} from 'lib/hooks/usePalette' import {STATUS_PAGE_URL} from 'lib/constants' +import {useOnboardingState} from '#/state/shell' export const withAuthRequired = <P extends object>( Component: React.ComponentType<P>, ): React.FC<P> => observer(function AuthRequired(props: P) { const store = useStores() + const onboardingState = useOnboardingState() if (store.session.isResumingSession) { return <Loading /> } if (!store.session.hasSession) { return <LoggedOut /> } - if (store.onboarding.isActive) { + if (onboardingState.isActive) { return <Onboarding /> } return <Component {...props} /> |