File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -247,23 +247,15 @@ function SearchInterface() {
247247 await performSearch ( example ) ;
248248 } ;
249249
250- // Load query from URL parameters on mount
250+ // Load query from URL parameters on mount only
251251 useEffect ( ( ) => {
252252 const urlQuery = searchParams . get ( "q" ) ;
253253 if ( urlQuery ) {
254254 setQuery ( urlQuery ) ;
255255 performSearch ( urlQuery ) ;
256256 }
257257 fetchStats ( ) ;
258- } , [ searchParams ] ) ;
259-
260- // Update query state when URL changes
261- useEffect ( ( ) => {
262- const urlQuery = searchParams . get ( "q" ) || "" ;
263- if ( urlQuery !== query ) {
264- setQuery ( urlQuery ) ;
265- }
266- } , [ searchParams , query ] ) ;
258+ } , [ ] ) ; // Empty dependency array - only run on mount
267259
268260 return (
269261 < div className = "min-h-screen py-4" >
You can’t perform that action at this time.
0 commit comments