Skip to content

Commit

Permalink
fix header showing active recruitment when none
Browse files Browse the repository at this point in the history
  • Loading branch information
magsyg committed Dec 11, 2024
1 parent 3f5e652 commit ab4a5fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/Components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export function Navbar() {
});
}, []);

const showActiveRecruitments = activeRecruitments !== undefined && activeRecruitments?.length > 0;

// Return profile button for navbar if logged in.
const mobileProfileButton = (
<div className={styles.navbar_profile_button}>
Expand Down Expand Up @@ -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 : ''}
/>
</div>
);
Expand Down

0 comments on commit ab4a5fb

Please sign in to comment.