From e781b4cc9787f883e2d8ad1dc888abb4ef3fdf74 Mon Sep 17 00:00:00 2001 From: ShivaniKhaire Date: Sat, 26 Sep 2026 17:37:07 +0530 Subject: [PATCH] fix(tabs): prevent bottom navigation labels from being cut off --- src/app/(tabs)/_layout.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/app/(tabs)/_layout.tsx b/src/app/(tabs)/_layout.tsx index b57ad68..74e0d2f 100644 --- a/src/app/(tabs)/_layout.tsx +++ b/src/app/(tabs)/_layout.tsx @@ -7,8 +7,9 @@ import { useAuthStore } from "@/store/auth.store"; export default function TabsLayout() { const insets = useSafeAreaInsets(); - const bottomPadding = insets.bottom > 0 ? insets.bottom : 8; - const tabBarHeight = 52 + bottomPadding; + const isWeb = Platform.OS === "web"; + const bottomPadding = insets.bottom > 0 ? insets.bottom : (isWeb ? 8 : 8); + const tabBarHeight = (isWeb ? 66 : 60) + (insets.bottom > 0 ? insets.bottom : 0); const { accessToken, logout } = useAuthStore(); const isAuthenticated = !!accessToken; @@ -56,8 +57,17 @@ export default function TabsLayout() { borderTopWidth: 1, borderTopColor: "#E5E7EB", height: tabBarHeight, - paddingBottom: bottomPadding, - paddingTop: 8, + paddingBottom: isWeb ? 8 : bottomPadding, + paddingTop: 6, + }, + tabBarLabelStyle: { + fontSize: 11, + fontWeight: "500", + marginTop: 2, + }, + tabBarItemStyle: { + justifyContent: "center", + alignItems: "center", }, }} >