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/shell/index.web.tsx | |
parent | 3a211017d3d972fb442069e38d1b8ff1a2edbd57 (diff) | |
download | voidsky-4afed4be281b6319c328938e4ed757624a78b13c.tar.zst |
Move onboarding state to new persistence + reducer context (#1835)
Diffstat (limited to 'src/view/shell/index.web.tsx')
-rw-r--r-- | src/view/shell/index.web.tsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx index 843d0b284..1731ea247 100644 --- a/src/view/shell/index.web.tsx +++ b/src/view/shell/index.web.tsx @@ -17,12 +17,17 @@ import {BottomBarWeb} from './bottom-bar/BottomBarWeb' import {useNavigation} from '@react-navigation/native' import {NavigationProp} from 'lib/routes/types' import {useAuxClick} from 'lib/hooks/useAuxClick' -import {useIsDrawerOpen, useSetDrawerOpen} from '#/state/shell' +import { + useIsDrawerOpen, + useSetDrawerOpen, + useOnboardingState, +} from '#/state/shell' const ShellInner = observer(function ShellInnerImpl() { const store = useStores() const isDrawerOpen = useIsDrawerOpen() const setDrawerOpen = useSetDrawerOpen() + const onboardingState = useOnboardingState() const {isDesktop, isMobile} = useWebMediaQueries() const navigator = useNavigation<NavigationProp>() useAuxClick() @@ -34,9 +39,9 @@ const ShellInner = observer(function ShellInnerImpl() { }) }, [navigator, store.shell, setDrawerOpen]) - const showBottomBar = isMobile && !store.onboarding.isActive + const showBottomBar = isMobile && !onboardingState.isActive const showSideNavs = - !isMobile && store.session.hasSession && !store.onboarding.isActive + !isMobile && store.session.hasSession && !onboardingState.isActive return ( <View style={[s.hContentRegion, {overflow: 'hidden'}]}> <View style={s.hContentRegion}> |