From c5a4a733c4a5c5d371b0af815f0e4611c40e0a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Celine=20P=C3=B6hl?= Date: Mon, 3 Jun 2024 16:20:17 +0200 Subject: [PATCH] Small change for linting check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Celine Pöhl --- frontend/src/components/PopUp/SearchBar.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/PopUp/SearchBar.tsx b/frontend/src/components/PopUp/SearchBar.tsx index 2534735d..2a322f77 100644 --- a/frontend/src/components/PopUp/SearchBar.tsx +++ b/frontend/src/components/PopUp/SearchBar.tsx @@ -22,17 +22,17 @@ const SearchBar: React.FC = () => { const { currentMapCache } = useContext(MapContext); const { currentSearchCache, setCurrentSearchCache } = useContext(SearchContext); - const provider = new OpenStreetMapProvider({ - params: { - "accept-language": "de", - countrycodes: "de", - addressdetails: 1, - }, - }); const fetch = useMemo( () => debounce(async (query: string, callback: (results: MapSelection[]) => void) => { + const provider = new OpenStreetMapProvider({ + params: { + "accept-language": "de", + countrycodes: "de", + addressdetails: 1, + }, + }); if (query === "") { callback([]); return; @@ -44,7 +44,7 @@ const SearchBar: React.FC = () => { })); callback(transformedResults); }, 400), - [provider] + [] ); useEffect(() => {