From 33913d9abb6eee5cda190b06730d10d72e2ddcb9 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 16 Jul 2022 16:06:07 +0200 Subject: [PATCH] Fix missing deps --- components/auth/requests.tsx | 2 +- components/generic/loading/promise.tsx | 2 +- components/postcard/changer.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/auth/requests.tsx b/components/auth/requests.tsx index 186fe21..1d75213 100644 --- a/components/auth/requests.tsx +++ b/components/auth/requests.tsx @@ -65,7 +65,7 @@ export function useAxiosRequest(config: AxiosRequestC async (funcConfig: AxiosRequestConfig = {}): Promise> => { return await axios.request({ ...config, ...funcConfig }) }, - [config] + [axios, config] ) const promiseHook = usePromise(performRequest) diff --git a/components/generic/loading/promise.tsx b/components/generic/loading/promise.tsx index 91c44f4..6610cce 100644 --- a/components/generic/loading/promise.tsx +++ b/components/generic/loading/promise.tsx @@ -96,7 +96,7 @@ export function usePromise(func: UsePromiseFunction): Use dispatch({ type: "fulfill", result }) return }, - [] + [func] ) return { ...state, run } diff --git a/components/postcard/changer.tsx b/components/postcard/changer.tsx index 6b2d941..d3d69ef 100644 --- a/components/postcard/changer.tsx +++ b/components/postcard/changer.tsx @@ -13,7 +13,7 @@ export function usePostcardImage(src: PostcardSource) { () => { setSrc(src) }, - [src] + [src, setSrc] ) }