Skip to content

Commit

Permalink
at least i got to do some coding today (#286)
Browse files Browse the repository at this point in the history
Tok meg fritheten å merget jeg @jonasbjoralt
  • Loading branch information
jonasbjoralt authored Nov 16, 2023
1 parent 2a13222 commit a2e18d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/src/components/ActiveFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import { Filter } from "react-feather";
import { useUrlRouteFilter } from "@/hooks/staffing/useUrlRouteFilter";
import { useDepartmentFilter } from "@/hooks/staffing/useDepartmentFilter";
import { useYearsXpFilter } from "@/hooks/staffing/useYearsXpFilter";
import { useAvailabilityFilter } from "@/hooks/staffing/useAvailabilityFilter";

export default function ActiveFilters() {
const filterTextComponents: string[] = [];

const { searchFilter } = useUrlRouteFilter();
const { filteredDepartments } = useDepartmentFilter();
const { filteredYears } = useYearsXpFilter();
const { availabilityFilterOn } = useAvailabilityFilter();

if (searchFilter != "") filterTextComponents.push(` "${searchFilter}"`);

Expand All @@ -24,6 +26,10 @@ export default function ActiveFilters() {
);
}

if (availabilityFilterOn) {
filterTextComponents.push(" Ledig tid");
}

const filterSummaryText = filterTextComponents.join(", ");

return (
Expand Down

0 comments on commit a2e18d2

Please sign in to comment.