Skip to content

Commit

Permalink
💄 Hide filter for locations missing job postings
Browse files Browse the repository at this point in the history
  • Loading branch information
petterhh committed Dec 3, 2024
1 parent 1b07003 commit 8c18af4
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/components/sections/jobs/JobPostingList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,17 @@ export default function JobPostingList({
background="violet"
/>
{sortAlphabetically(companyLocations).map(
(location: CompanyLocation) => (
<Tag
active={locationFilter === location}
type="button"
onClick={() => setLocationFilter(location)}
text={`${location.companyLocationName} (${jobPostingsPerLocation[location.companyLocationName]})`}
key={location._id}
background="violet"
/>
),
(location: CompanyLocation) =>
jobPostingsPerLocation[location.companyLocationName] > 0 && (
<Tag
active={locationFilter === location}
type="button"
onClick={() => setLocationFilter(location)}
text={`${location.companyLocationName} (${jobPostingsPerLocation[location.companyLocationName]})`}
key={location._id}
background="violet"
/>
),
)}
</div>
<div className={styles.jobPostings}>
Expand Down

0 comments on commit 8c18af4

Please sign in to comment.