diff options
author | dan <dan.abramov@gmail.com> | 2024-12-12 21:57:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-12 21:57:26 +0000 |
commit | add7a91d54d24eb1f02c5a83c36db90834d94add (patch) | |
tree | 186a84610902474279cca393f491acf2c0760f9f | |
parent | 8a790cdd7f9c449ab49a2e1048cc82617b38c6b0 (diff) | |
download | voidsky-add7a91d54d24eb1f02c5a83c36db90834d94add.tar.zst |
Fix web Home header (#7086)
* Fix header disappearing on web * Make border nicer
-rw-r--r-- | src/components/hooks/useHeaderOffset.ts | 4 | ||||
-rw-r--r-- | src/view/com/home/HomeHeaderLayout.web.tsx | 16 | ||||
-rw-r--r-- | src/view/com/pager/TabBar.web.tsx | 2 |
3 files changed, 8 insertions, 14 deletions
diff --git a/src/components/hooks/useHeaderOffset.ts b/src/components/hooks/useHeaderOffset.ts index 5c80e18fe..c9987df77 100644 --- a/src/components/hooks/useHeaderOffset.ts +++ b/src/components/hooks/useHeaderOffset.ts @@ -8,8 +8,8 @@ export function useHeaderOffset() { if (isDesktop || isTablet) { return 0 } - const navBarHeight = 42 - const tabBarPad = 10 + 10 + 6 // padding + arbitrary + const navBarHeight = 52 + const tabBarPad = 10 + 10 + 3 // padding + border const normalLineHeight = 20 // matches tab bar const tabBarText = normalLineHeight * fontScale return navBarHeight + tabBarPad + tabBarText diff --git a/src/view/com/home/HomeHeaderLayout.web.tsx b/src/view/com/home/HomeHeaderLayout.web.tsx index 7a8a7671d..d8bbe19e6 100644 --- a/src/view/com/home/HomeHeaderLayout.web.tsx +++ b/src/view/com/home/HomeHeaderLayout.web.tsx @@ -1,10 +1,8 @@ import React from 'react' import {View} from 'react-native' -import Animated from 'react-native-reanimated' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {useMinimalShellHeaderTransform} from '#/lib/hooks/useMinimalShellTransform' import {useKawaiiMode} from '#/state/preferences/kawaii' import {useSession} from '#/state/session' import {useShellLayout} from '#/state/shell/shell-layout' @@ -36,7 +34,6 @@ function HomeHeaderLayoutDesktopAndTablet({ tabBarAnchor: JSX.Element | null | undefined }) { const t = useTheme() - const headerMinimalShellTransform = useMinimalShellHeaderTransform() const {headerHeight} = useShellLayout() const {hasSession} = useSession() const {_} = useLingui() @@ -69,14 +66,11 @@ function HomeHeaderLayoutDesktopAndTablet({ )} {tabBarAnchor} <Layout.Center - style={[a.sticky, a.z_10, a.align_center, t.atoms.bg, {top: 0}]}> - <Animated.View - onLayout={e => { - headerHeight.set(e.nativeEvent.layout.height) - }} - style={[headerMinimalShellTransform]}> - {children} - </Animated.View> + style={[a.sticky, a.z_10, a.align_center, t.atoms.bg, {top: 0}]} + onLayout={e => { + headerHeight.set(e.nativeEvent.layout.height) + }}> + {children} </Layout.Center> </> ) diff --git a/src/view/com/pager/TabBar.web.tsx b/src/view/com/pager/TabBar.web.tsx index f44e03368..c83889432 100644 --- a/src/view/com/pager/TabBar.web.tsx +++ b/src/view/com/pager/TabBar.web.tsx @@ -199,7 +199,7 @@ const mobileStyles = StyleSheet.create({ textAlign: 'center', minWidth: 45, paddingBottom: 10, - borderBottomWidth: 2, + borderBottomWidth: 3, borderBottomColor: 'transparent', }, outerBottomBorder: { |