Skip to content

Commit

Permalink
rename to agency name lookup and change to parentheses on labels
Browse files Browse the repository at this point in the history
  • Loading branch information
rylew1 committed Apr 18, 2024
1 parent 8d1ec17 commit 3fe4adc
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 115 deletions.
8 changes: 4 additions & 4 deletions frontend/src/app/search/SearchForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { AgencyFilterLookup } from "src/utils/search/generateAgencyFilterLookup";
import { AgencyNamyLookup } from "src/utils/search/generateAgencyNameLookup";
import { SearchAPIResponse } from "../../types/search/searchResponseTypes";
import SearchBar from "../../components/search/SearchBar";
import { SearchFetcherProps } from "../../services/search/searchfetcher/SearchFetcher";
Expand All @@ -17,13 +17,13 @@ import { useSearchFormState } from "../../hooks/useSearchFormState";
interface SearchFormProps {
initialSearchResults: SearchAPIResponse;
requestURLQueryParams: SearchFetcherProps;
agencyFilterLookup?: AgencyFilterLookup;
agencyNameLookup?: AgencyNamyLookup;
}

export function SearchForm({
initialSearchResults,
requestURLQueryParams,
agencyFilterLookup,
agencyNameLookup,
}: SearchFormProps) {
// Capture top level logic, including useFormState in the useSearchFormState hook
const {
Expand Down Expand Up @@ -100,7 +100,7 @@ export function SearchForm({
<SearchResultsList
searchResults={searchResults?.data}
maxPaginationError={maxPaginationError}
agencyFilterLookup={agencyFilterLookup}
agencyNameLookup={agencyNameLookup}
errors={searchResults.errors}
/>
{searchResults?.data?.length >= 1 ? (
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import SearchCallToAction from "../../components/search/SearchCallToAction";
import { SearchForm } from "./SearchForm";
import { convertSearchParamsToProperTypes } from "../../utils/search/convertSearchParamsToProperTypes";
import { cookies } from "next/headers";
import { generateAgencyFilterLookup } from "src/utils/search/generateAgencyFilterLookup";
import { generateAgencyNameLookup } from "src/utils/search/generateAgencyNameLookup";
import { getSearchFetcher } from "../../services/search/searchfetcher/SearchFetcherUtil";
import { notFound } from "next/navigation";

Expand Down Expand Up @@ -62,7 +62,7 @@ export default async function Search({ searchParams }: ServerPageProps) {
<SearchForm
initialSearchResults={initialSearchResults}
requestURLQueryParams={convertedSearchParams}
agencyFilterLookup={generateAgencyFilterLookup()}
agencyNameLookup={generateAgencyNameLookup()}
/>
</>
);
Expand Down
Loading

0 comments on commit 3fe4adc

Please sign in to comment.