Hide navigation badge text in moible bottom bar

This commit is contained in:
schroda
2026-04-11 15:40:54 +02:00
parent 69e53d365b
commit 4b2c736052
2 changed files with 6 additions and 1 deletions

View File

@@ -60,6 +60,7 @@ export const MobileBottomBar = ({ navBarItems }: { navBarItems: NavbarItem[] })
}, },
}, },
}} }}
forceCollapsed
/> />
))} ))}
</Stack> </Stack>

View File

@@ -29,17 +29,21 @@ export const NavigationBarItem = ({
SelectedIconComponent, SelectedIconComponent,
useBadge, useBadge,
slots, slots,
forceCollapsed,
}: NavbarItem & { }: NavbarItem & {
slots?: { slots?: {
listItemLink?: Partial<ComponentProps<typeof ListItemLink>>; listItemLink?: Partial<ComponentProps<typeof ListItemLink>>;
}; };
forceCollapsed?: boolean;
}) => { }) => {
const { t } = useLingui(); const { t } = useLingui();
const location = useLocation(); const location = useLocation();
const { isCollapsed } = useNavBarContext(); const { isCollapsed: isCollapsedContext } = useNavBarContext();
const theme = useTheme(); const theme = useTheme();
const badgeInfo = useBadge?.(); const badgeInfo = useBadge?.();
const isCollapsed = forceCollapsed ?? isCollapsedContext;
const isActive = location.pathname.startsWith(path); const isActive = location.pathname.startsWith(path);
const Icon = isActive ? SelectedIconComponent : IconComponent; const Icon = isActive ? SelectedIconComponent : IconComponent;