diff --git a/src/components/ProjectSearch/ProjectSearch.tsx b/src/components/ProjectSearch/ProjectSearch.tsx index e2b4982..bedce36 100644 --- a/src/components/ProjectSearch/ProjectSearch.tsx +++ b/src/components/ProjectSearch/ProjectSearch.tsx @@ -9,6 +9,7 @@ import EditNote from "@mui/icons-material/EditNote"; import uniq from "lodash/uniq"; import { useRouter } from "next/navigation"; import { MAINTAIN_PROJECT } from "@/middleware"; +import { uniqBy } from "lodash"; interface Props { projects: ProjectResult[]; @@ -20,7 +21,6 @@ type SearchQuery = Partial>; type SearchParamNames = keyof SearchQuery; const ProjectSearch: React.FC = ({ projects, projectCategories, abilities }) => { - console.log(projects) const router = useRouter(); const { t } = useTranslation("projects"); @@ -34,7 +34,7 @@ const ProjectSearch: React.FC = ({ projects, projectCategories, abilities label: t("Client name"), paramName: "client", type: "autocomplete", - options: uniq(projects.map((project) => ({value: project.client, label: project.client}))), + options: uniqBy(projects.map((project) => ({value: project.client, label: project.client})), "value"), }, { label: t("Project category"),