mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-23 07:04:22 +00:00
Fix missing deps
This commit is contained in:
parent
990e7e1d7e
commit
33913d9abb
3 changed files with 3 additions and 3 deletions
|
@ -65,7 +65,7 @@ export function useAxiosRequest<Output = any, Input = any>(config: AxiosRequestC
|
||||||
async (funcConfig: AxiosRequestConfig<Input> = {}): Promise<AxiosResponse<Output, Input>> => {
|
async (funcConfig: AxiosRequestConfig<Input> = {}): Promise<AxiosResponse<Output, Input>> => {
|
||||||
return await axios.request({ ...config, ...funcConfig })
|
return await axios.request({ ...config, ...funcConfig })
|
||||||
},
|
},
|
||||||
[config]
|
[axios, config]
|
||||||
)
|
)
|
||||||
|
|
||||||
const promiseHook = usePromise(performRequest)
|
const promiseHook = usePromise(performRequest)
|
||||||
|
|
|
@ -96,7 +96,7 @@ export function usePromise<D, P, E = Error>(func: UsePromiseFunction<D, P>): Use
|
||||||
dispatch({ type: "fulfill", result })
|
dispatch({ type: "fulfill", result })
|
||||||
return
|
return
|
||||||
},
|
},
|
||||||
[]
|
[func]
|
||||||
)
|
)
|
||||||
|
|
||||||
return { ...state, run }
|
return { ...state, run }
|
||||||
|
|
|
@ -13,7 +13,7 @@ export function usePostcardImage(src: PostcardSource) {
|
||||||
() => {
|
() => {
|
||||||
setSrc(src)
|
setSrc(src)
|
||||||
},
|
},
|
||||||
[src]
|
[src, setSrc]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue