mirror of
https://github.com/strapi/strapi.git
synced 2025-09-17 20:40:17 +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
|
||||
source.cancel();
|
||||
};
|
||||
});
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
// const options = {
|
||||
// cancelToken: source.token,
|
||||
// };
|
||||
const options = {
|
||||
cancelToken: source.token,
|
||||
};
|
||||
|
||||
return getFetchClient();
|
||||
return getFetchClient(options);
|
||||
};
|
||||
|
||||
export default useFetchClient;
|
||||
|
Loading…
x
Reference in New Issue
Block a user