diff --git a/components/SearchBar.tsx b/components/SearchBar.tsx index 4f601174..2c14198b 100644 --- a/components/SearchBar.tsx +++ b/components/SearchBar.tsx @@ -17,6 +17,7 @@ import { SearchPanel, SearchPanelProps } from "./SearchPanel"; import { useAutocomplete } from "@lib/hooks/autocomplete"; import { AutocompleteItem } from "@lib/hooks/autocomplete"; import { Box } from "@chakra-ui/react"; +import React from "react"; const initialAutocompleteState: AutocompleteState = { collections: [], @@ -29,7 +30,7 @@ const initialAutocompleteState: AutocompleteState = { }; // Returns the search bar displayed in the header and the home page -export function SearchBar( +function SearchBar( props: Partial> & { overlay: boolean } ) { const [autocompleteState, setAutocompleteState] = useState< @@ -53,3 +54,5 @@ export function SearchBar( ); } + +export default React.memo(SearchBar);