diff --git a/pages/search.tsx b/pages/search.tsx index d41a047..8b8056a 100644 --- a/pages/search.tsx +++ b/pages/search.tsx @@ -60,7 +60,7 @@ export default function SearchResults() { }, ); const resFunctions = await fetch( - `${API_URL}/search_functions?q=${searchTerm}&page=${pageNumber}&latest=1`, + `${API_URL}/search_functions?q=${searchTerm}&package=${searchTerm}&page=${pageNumber}&latest=1`, { headers: { Accept: 'application/json', @@ -73,6 +73,7 @@ export default function SearchResults() { setFunctionResults(functions); setIsLoading(false); } catch (error) { + setIsLoading(false); console.log(error); } }