src/applications/resources-and-support/hooks/useGetSearchResults.js
Function useGetSearchResults
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function useGetSearchResults(articles, query, page) {
const [results, setResults] = useState([]);
// Refresh the results list when the query is submitted or the page is changed.
useEffect(