fix(tabs): prevent bottom navigation labels from being cut off #26

Merged
amit merged 1 commits from fix/bottom-tab-bar-layout into main 2026-09-26 13:45:28 +00:00
1 changed files with 14 additions and 4 deletions

View File

@ -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",
},
}}
>