about summary refs log tree commit diff
path: root/src/view/com/home/HomeHeaderLayout.web.tsx
diff options
context:
space:
mode:
authorJan-Olof Eriksson <jan-olof.eriksson@iki.fi>2024-03-11 14:52:33 +0200
committerGitHub <noreply@github.com>2024-03-11 14:52:33 +0200
commit4a2251f48bd51d8bd427d21f0dd697c8d43d7856 (patch)
tree17b7d68f0a19f54313607257de79accc7b6daf4c /src/view/com/home/HomeHeaderLayout.web.tsx
parentcbc65247ae57502356165a5d51270bd8d19fd9a5 (diff)
parent596e744d4177d3be6defeef68f202a70baaf6e37 (diff)
downloadvoidsky-4a2251f48bd51d8bd427d21f0dd697c8d43d7856.tar.zst
Merge branch 'bluesky-social:main' into main
Diffstat (limited to 'src/view/com/home/HomeHeaderLayout.web.tsx')
-rw-r--r--src/view/com/home/HomeHeaderLayout.web.tsx19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/view/com/home/HomeHeaderLayout.web.tsx b/src/view/com/home/HomeHeaderLayout.web.tsx
index 6145081af..9818b56f6 100644
--- a/src/view/com/home/HomeHeaderLayout.web.tsx
+++ b/src/view/com/home/HomeHeaderLayout.web.tsx
@@ -1,5 +1,6 @@
 import React from 'react'
 import {StyleSheet, View} from 'react-native'
+import Animated from 'react-native-reanimated'
 import {usePalette} from 'lib/hooks/usePalette'
 import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
 import {HomeHeaderLayoutMobile} from './HomeHeaderLayoutMobile'
@@ -12,6 +13,8 @@ import {
 import {useLingui} from '@lingui/react'
 import {msg} from '@lingui/macro'
 import {CogIcon} from '#/lib/icons'
+import {useMinimalShellMode} from 'lib/hooks/useMinimalShellMode'
+import {useShellLayout} from '#/state/shell/shell-layout'
 
 export function HomeHeaderLayout(props: {
   children: React.ReactNode
@@ -33,6 +36,8 @@ function HomeHeaderLayoutDesktopAndTablet({
   tabBarAnchor: JSX.Element | null | undefined
 }) {
   const pal = usePalette('default')
+  const {headerMinimalShellTransform} = useMinimalShellMode()
+  const {headerHeight} = useShellLayout()
   const {_} = useLingui()
 
   return (
@@ -60,9 +65,19 @@ function HomeHeaderLayoutDesktopAndTablet({
         </Link>
       </View>
       {tabBarAnchor}
-      <View style={[pal.view, pal.border, styles.bar, styles.tabBar]}>
+      <Animated.View
+        onLayout={e => {
+          headerHeight.value = e.nativeEvent.layout.height
+        }}
+        style={[
+          pal.view,
+          pal.border,
+          styles.bar,
+          styles.tabBar,
+          headerMinimalShellTransform,
+        ]}>
         {children}
-      </View>
+      </Animated.View>
     </>
   )
 }