feat: unauthenticated tab

This commit is contained in:
2025-11-05 10:58:34 +01:00
parent 8180e0b375
commit e8db8d1654
15 changed files with 229 additions and 58 deletions
+8 -1
View File
@@ -19,6 +19,13 @@ const TabBar = ({ state = {}, descriptors = {}, navigation = {} }) => {
: isIOS
? Math.max(bottomInset, fallbackBottomOffset)
: bottomInset + fallbackBottomOffset;
const visibleRoutesCount = Math.max(
1,
(state?.routes || []).reduce((count, route) => {
const descriptor = descriptors[route.key];
return descriptor?.options?.hide ? count : count + 1;
}, 0)
);
return (
<View
@@ -87,7 +94,7 @@ const TabBar = ({ state = {}, descriptors = {}, navigation = {} }) => {
key={route.key}
style={{
alignSelf: "center",
width: `${100 / state?.routes?.length}%`,
width: `${100 / visibleRoutesCount}%`,
height: "100%",
...Style.containerCenter,
}}