Skip to content

Commit 2390100

Browse files
committed
refactor(mobile): remove useBottomTabInset, rely on NativeTabs automatic insets
1 parent 9f8f2d9 commit 2390100

File tree

3 files changed

+2
-26
lines changed

3 files changed

+2
-26
lines changed

apps/mobile/src/app/explore.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ import { ThemedView } from '@/components/themed-view'
99
import { Collapsible } from '@/components/ui/collapsible'
1010
import { WebBadge } from '@/components/web-badge'
1111
import { MaxContentWidth, Spacing } from '@/constants/theme'
12-
import { useBottomTabInset } from '@/hooks/use-bottom-tab-inset'
1312
import { useTheme } from '@/hooks/use-theme'
1413

1514
export default function TabTwoScreen() {
1615
const safeAreaInsets = useSafeAreaInsets()
17-
const { full: bottomTabInset } = useBottomTabInset()
1816
const insets = {
1917
...safeAreaInsets,
20-
bottom: bottomTabInset + Spacing.three,
18+
bottom: safeAreaInsets.bottom + Spacing.three,
2119
}
2220
const theme = useTheme()
2321

apps/mobile/src/app/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { ThemedText } from '@/components/themed-text'
88
import { ThemedView } from '@/components/themed-view'
99
import { WebBadge } from '@/components/web-badge'
1010
import { MaxContentWidth, Spacing } from '@/constants/theme'
11-
import { useBottomTabInset } from '@/hooks/use-bottom-tab-inset'
1211

1312
function getDevMenuHint() {
1413
if (Platform.OS === 'web') return <ThemedText type="small">use browser devtools</ThemedText>
@@ -29,10 +28,9 @@ function getDevMenuHint() {
2928
}
3029

3130
export default function HomeScreen() {
32-
const { tabBarOnly } = useBottomTabInset()
3331
return (
3432
<ThemedView style={styles.container}>
35-
<SafeAreaView style={[styles.safeArea, { paddingBottom: tabBarOnly + Spacing.three }]}>
33+
<SafeAreaView style={[styles.safeArea, { paddingBottom: Spacing.three }]}>
3634
<ThemedView style={styles.heroSection}>
3735
<AnimatedIcon />
3836
<ThemedText type="title" style={styles.title}>

apps/mobile/src/hooks/use-bottom-tab-inset.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)