From 470a8e337334b06b97a2569150fa61dfe45f6c1d Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Wed, 22 Nov 2023 16:58:28 -0300 Subject: [PATCH] Fixing /all calls quantity --- src/frontend/src/contexts/typesContext.tsx | 4 ++-- .../src/pages/MainPage/components/components/index.tsx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/contexts/typesContext.tsx b/src/frontend/src/contexts/typesContext.tsx index d08af1857..672295f26 100644 --- a/src/frontend/src/contexts/typesContext.tsx +++ b/src/frontend/src/contexts/typesContext.tsx @@ -42,7 +42,7 @@ export function TypesProvider({ children }: { children: ReactNode }) { const [data, setData] = useState({}); const [fetchError, setFetchError] = useState(false); const { setLoading } = useContext(alertContext); - const { getAuthentication, autoLogin, userData } = useContext(AuthContext); + const { getAuthentication } = useContext(AuthContext); const [getFilterEdge, setFilterEdge] = useState([]); useEffect(() => { @@ -50,7 +50,7 @@ export function TypesProvider({ children }: { children: ReactNode }) { if (getAuthentication() === true) { getTypes(); } - }, [getAuthentication(), autoLogin, userData]); + }, [getAuthentication()]); async function getTypes(): Promise { // We will keep a flag to handle the case where the component is unmounted before the API call resolves. diff --git a/src/frontend/src/pages/MainPage/components/components/index.tsx b/src/frontend/src/pages/MainPage/components/components/index.tsx index 280668700..7ea4825bf 100644 --- a/src/frontend/src/pages/MainPage/components/components/index.tsx +++ b/src/frontend/src/pages/MainPage/components/components/index.tsx @@ -51,7 +51,6 @@ export default function ComponentsComponent({ const start = (pageIndex - 1) * pageSize; const end = start + pageSize; setData(allData.slice(start, end)); - console.log(allData); }, [pageIndex, pageSize, allData]); const [data, setData] = useState([]);