We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fdc1a0 commit 88c79dfCopy full SHA for 88c79df
crud-api/src/App.tsx
@@ -91,11 +91,10 @@ const App: React.FC = () => {
91
timeout: 5000
92
})
93
.then(({ data }) => {
94
- setLoading(false)
95
setPosts(data)
+ setLoading(false)
96
97
.catch(ex => {
98
99
const { response: { status = 0 } = { status: 0 }, code = '' } = ex
100
const error = axios.isCancel(ex)
101
? 'request canceled'
@@ -105,6 +104,7 @@ const App: React.FC = () => {
105
104
? 'resource not found'
106
: 'unexpected error occured'
107
setError(error)
108
109
}
110
0 commit comments