From e4d7133fe3dc866820ed29643b17b1ea804a44ff Mon Sep 17 00:00:00 2001 From: Luis Felipe Risch <lfr20@inf.ufpr.br> Date: Fri, 28 May 2021 12:23:46 -0300 Subject: [PATCH] Fixed the double seacrh --- src/Pages/Search.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Pages/Search.js b/src/Pages/Search.js index db1c0201..df731561 100644 --- a/src/Pages/Search.js +++ b/src/Pages/Search.js @@ -142,8 +142,10 @@ export default function Search(props) { }, [window.history.state === null ? true : window.history.state.key, state.currentUser.id]) useEffect(() => { - setIsLoading(true); - collectStuff(option); + if (resultsPerPage > 12) { + setIsLoading(true); + collectStuff(option); + } }, [resultsPerPage]); return ( -- GitLab