Skip to content

Commit

Permalink
add types
Browse files Browse the repository at this point in the history
  • Loading branch information
charmingduchess committed Dec 15, 2023
1 parent dd4517e commit bc8b701
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/SearchForm/SearchForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { SearchBar, Box, Spacer } from "@nypl/design-system-react-components"
import { useRouter } from "next/router"
import type { SyntheticEvent, Dispatch, SetStateAction } from "react"
import type {
SyntheticEvent,
Dispatch,
SetStateAction,
ReactElement,
} from "react"
import { useState } from "react"

import styles from "../../../styles/components/Search.module.scss"
Expand All @@ -9,11 +14,14 @@ import { getQueryString } from "../../utils/searchUtils"
import { BASE_URL, PATHS } from "../../config/constants"
import EDSLink from "../EDSLink"

interface SearchFormProps {
refineSearch?: ReactElement
}
/**
* The SearchForm component renders and controls the Search form and
* advanced search link.
*/
const SearchForm = ({ refineSearch }) => {
const SearchForm = ({ refineSearch }: SearchFormProps) => {
const router = useRouter()
const [searchTerm, setSearchTerm] = useState(
(router?.query?.q as string) || ""
Expand Down

0 comments on commit bc8b701

Please sign in to comment.