forked from polka_billy/porridger
Converted put(api/announcement) to use useSend
Added useSendButtonCaption hook Related to #19
This commit is contained in:
@ -24,6 +24,7 @@ function useSend<R, T>(
|
||||
/** Don't use in useEffect. If you need request result, go with useFetch instead */
|
||||
const doSend = useCallback(async (urlProps?: Record<string, string>, params?: Omit<RequestInit, 'method'>) => {
|
||||
setLoading(true)
|
||||
setError(null)
|
||||
|
||||
if (abortControllerRef.current) {
|
||||
abortControllerRef.current.abort()
|
||||
|
Reference in New Issue
Block a user