Skip to content

Commit

Permalink
remove countries from filterlist (#1110)
Browse files Browse the repository at this point in the history
  • Loading branch information
anemne authored Jan 8, 2025
1 parent e41a45f commit 47bb6cd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/sections/jobs/JobPostingList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ interface JobPostingListProps {
companyLocations: CompanyLocation[];
}

const hiddenLocations = new Set(["Norge", "Norway", "Sverige", "Sweden"]);

function sortAlphabetically(filter: CompanyLocation[]) {
return filter.sort(
(a, b) =>
Expand Down Expand Up @@ -69,6 +71,10 @@ export default function JobPostingList({
}
}, [locationFilter, jobPostings, jobPostingLocations]);

const filteredLocations = companyLocations.filter(
(location) => !hiddenLocations.has(location.companyLocationName),
);

return (
<div className={styles.jobPostingsContainer}>
<div className={styles.filters}>
Expand All @@ -80,7 +86,7 @@ export default function JobPostingList({
text={`${t("all")} (${jobPostings.length})`}
background="violet"
/>
{sortAlphabetically(companyLocations).map(
{sortAlphabetically(filteredLocations).map(
(location: CompanyLocation) => (
<Tag
active={locationFilter === location}
Expand Down

0 comments on commit 47bb6cd

Please sign in to comment.