Created
February 5, 2023 12:45
-
-
Save PaulSebalu/66a555c74606a4525c36a554cb77bf27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//set timeout for network request and show exception | |
await axios | |
.post(`${API_URL}/bank/verify`, { | |
...data, | |
}) | |
.then((res) => { | |
setStatus({ | |
status: res.data, | |
type: 'info', | |
}) | |
}) | |
.catch((error) => { | |
setStatus({ | |
status: error.response.data, | |
type: 'error', | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment