mirror of
https://github.com/strapi/strapi.git
synced 2025-09-18 13:02:18 +00:00
fix useeffect dependency
This commit is contained in:
parent
0aa31064b2
commit
7c650d340c
@ -8,13 +8,14 @@ const useFetchClient = () => {
|
|||||||
// when unmount cancel the axios request
|
// when unmount cancel the axios request
|
||||||
source.cancel();
|
source.cancel();
|
||||||
};
|
};
|
||||||
});
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, []);
|
||||||
|
|
||||||
// const options = {
|
const options = {
|
||||||
// cancelToken: source.token,
|
cancelToken: source.token,
|
||||||
// };
|
};
|
||||||
|
|
||||||
return getFetchClient();
|
return getFetchClient(options);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default useFetchClient;
|
export default useFetchClient;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user