From 6a88f3e7f4d163cd184b88755740cca2add25e98 Mon Sep 17 00:00:00 2001 From: Pavan Gangireddy Date: Sat, 28 May 2022 14:58:31 +0530 Subject: [PATCH] Update spelling from useLoadiing to useLoading --- hooks/useFetch.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hooks/useFetch.js b/hooks/useFetch.js index 029f6219..5b824d1b 100644 --- a/hooks/useFetch.js +++ b/hooks/useFetch.js @@ -5,14 +5,14 @@ import useApi from './useApi'; export default function useFetch(url, options = {}, update = []) { const [response, setResponse] = useState(); const [error, setError] = useState(); - const [loading, setLoadiing] = useState(false); + const [loading, setLoading] = useState(false); const [count, setCount] = useState(0); const { get } = useApi(); const { params = {}, headers = {}, disabled, delay = 0, interval, onDataLoad } = options; async function loadData(params) { try { - setLoadiing(true); + setLoading(true); setError(null); const time = performance.now(); @@ -32,7 +32,7 @@ export default function useFetch(url, options = {}, update = []) { console.error(e); setError(e); } finally { - setLoadiing(false); + setLoading(false); } }