Archived
🎨 standardJS all files
This commit is contained in:
1 parent
dc962c9120
commit
4be7a46a10
85 files changed
+3595
-2383
No files matched your search
@@ -14,11 +14,11 @@ function useAPI (url, defaultData = [], method = 'get', options = {}) {
|
||||
|
||||
useEffect(() => {
|
||||
api[method](url, options)
|
||||
.then((result) => {
|
||||
.then(result => {
|
||||
setData(result.data)
|
||||
setIsLoading(false)
|
||||
})
|
||||
.catch((error) => {
|
||||
.catch(error => {
|
||||
setHasError(true)
|
||||
console.error(error)
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user