Skip to content

Commit

Permalink
Fix missing search text (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigridge authored Oct 26, 2023
1 parent 75efb1b commit 54a177e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/components/ActiveFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ import { Filter } from "react-feather";
import { useFilteredConsultants } from "@/hooks/useFilteredConsultants";

export default function ActiveFilters() {
const { filteredDepartments, currentNameSearch, filteredYears } =
const { filteredDepartments, currentSearch, filteredYears } =
useFilteredConsultants();
const filterTextComponents: string[] = [];

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

if (filteredDepartments.length > 0)
filterTextComponents.push(
Expand Down
1 change: 1 addition & 0 deletions frontend/src/hooks/useFilteredConsultants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ export function useFilteredConsultants() {
filteredDepartments,
filteredYears,
currentNameSearch: activeNameSearch,
currentSearch,
setNameSearch,
toggleDepartmentFilter,
toggleYearFilter,
Expand Down

0 comments on commit 54a177e

Please sign in to comment.