diff --git a/frontend/src/Components/Navbar/Navbar.tsx b/frontend/src/Components/Navbar/Navbar.tsx index 46e823da5..4f2ab2c73 100644 --- a/frontend/src/Components/Navbar/Navbar.tsx +++ b/frontend/src/Components/Navbar/Navbar.tsx @@ -56,6 +56,8 @@ export function Navbar() { }); }, []); + const showActiveRecruitments = activeRecruitments !== undefined && activeRecruitments?.length > 0; + // Return profile button for navbar if logged in. const mobileProfileButton = (
@@ -133,7 +135,7 @@ export function Navbar() { expandedDropdown={expandedDropdown} route={ROUTES.frontend.recruitment} label={t(KEY.common_volunteer)} - labelClassName={activeRecruitments && styles.active_recruitment} + labelClassName={showActiveRecruitments ? styles.active_recruitment : ''} />
);