From 45923c2e4d0abf79dc4dd184038ba331746400ec Mon Sep 17 00:00:00 2001 From: Brad Beattie Date: Thu, 19 Oct 2023 10:23:52 -0700 Subject: [PATCH] Update search.tsx --- src/apps/stable/routes/search.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/apps/stable/routes/search.tsx b/src/apps/stable/routes/search.tsx index 882e97d447..309e7820cf 100644 --- a/src/apps/stable/routes/search.tsx +++ b/src/apps/stable/routes/search.tsx @@ -22,9 +22,7 @@ const Search: FunctionComponent = () => { const [ query, setQuery ] = useState(searchParams.get('query') || ''); const prevQuery = usePrevious(query); - console.error('Search component initialized', { 'urlParam': searchParams.get('query'), 'obj.query': query, 'prevQuery': prevQuery }); if (query == prevQuery && searchParams.get('query') != query) { - console.error('SET QUERY VIA URL', searchParams.get('query')); setQuery(searchParams.get('query') || ''); } @@ -34,7 +32,6 @@ const Search: FunctionComponent = () => { /* Explicitly using `window.history.pushState` instead of `history.replace` as the use of the latter triggers a re-rendering of this component, resulting in double-execution searches. If there's a way to use `history` without this side effect, it would likely be preferable. */ - console.error('PUSH STATE VIA QUERY', query); window.history.pushState({}, '', `/#${history.location.pathname}${newSearch}`); } }, [query, prevQuery]);