Fixing /all calls quantity
This commit is contained in:
parent
0d785c923a
commit
470a8e3373
2 changed files with 2 additions and 3 deletions
|
|
@ -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<void> {
|
||||
// We will keep a flag to handle the case where the component is unmounted before the API call resolves.
|
||||
|
|
|
|||
|
|
@ -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<FlowType[]>([]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue