Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

show bottom bar on web tablet breakpoints when logged out (signup cta) (#2747)

* show signup bottom bar on web tablet

* show signup bottom bar on web tablet

* comment

* adjust load latest btn position based on logged in/out

authored by

Hailey and committed by
GitHub
0bbe2c5e 250b48d5

+15 -5
+8 -2
src/view/com/util/load-latest/LoadLatestBtn.tsx
··· 10 10 const AnimatedTouchableOpacity = 11 11 Animated.createAnimatedComponent(TouchableOpacity) 12 12 import {isWeb} from 'platform/detection' 13 + import {useSession} from 'state/session' 13 14 14 15 export function LoadLatestBtn({ 15 16 onPress, ··· 21 22 showIndicator: boolean 22 23 }) { 23 24 const pal = usePalette('default') 24 - const {isDesktop, isTablet, isMobile} = useWebMediaQueries() 25 + const {hasSession} = useSession() 26 + const {isDesktop, isTablet, isMobile, isTabletOrMobile} = useWebMediaQueries() 25 27 const {fabMinimalShellTransform} = useMinimalShellMode() 26 28 29 + // Adjust height of the fab if we have a session only on mobile web. If we don't have a session, we want to adjust 30 + // it on both tablet and mobile since we are showing the bottom bar (see createNativeStackNavigatorWithAuth) 31 + const showBottomBar = hasSession ? isMobile : isTabletOrMobile 32 + 27 33 return ( 28 34 <AnimatedTouchableOpacity 29 35 style={[ ··· 32 38 isTablet && styles.loadLatestTablet, 33 39 pal.borderDark, 34 40 pal.view, 35 - isMobile && fabMinimalShellTransform, 41 + showBottomBar && fabMinimalShellTransform, 36 42 ]} 37 43 onPress={onPress} 38 44 hitSlop={HITSLOP_20}
+7 -3
src/view/shell/createNativeStackNavigatorWithAuth.tsx
··· 101 101 const onboardingState = useOnboardingState() 102 102 const {showLoggedOut} = useLoggedOutView() 103 103 const {setShowLoggedOut} = useLoggedOutViewControls() 104 - const {isMobile} = useWebMediaQueries() 104 + const {isMobile, isTabletOrMobile} = useWebMediaQueries() 105 105 if ((!PWI_ENABLED || activeRouteRequiresAuth) && !hasSession) { 106 106 return <LoggedOut /> 107 107 } ··· 134 134 } 135 135 } 136 136 137 + // Show the bottom bar if we have a session only on mobile web. If we don't have a session, we want to show it 138 + // on both tablet and mobile web so that we see the sign up CTA. 139 + const showBottomBar = hasSession ? isMobile : isTabletOrMobile 140 + 137 141 return ( 138 142 <NavigationContent> 139 143 <NativeStackView ··· 142 146 navigation={navigation} 143 147 descriptors={newDescriptors} 144 148 /> 145 - {isWeb && isMobile && <BottomBarWeb />} 146 - {isWeb && !isMobile && ( 149 + {isWeb && showBottomBar && <BottomBarWeb />} 150 + {isWeb && !showBottomBar && ( 147 151 <> 148 152 <DesktopLeftNav /> 149 153 <DesktopRightNav routeName={activeRoute.name} />