debugging fetch on budget screen
This commit is contained in:
parent
8931386239
commit
85c737e66c
3 changed files with 35 additions and 32 deletions
|
|
@ -8,7 +8,6 @@ const useFetch = (query: Query) => {
|
|||
const [data, setData] = useState<{[column: string]: any;}[]>([]);
|
||||
|
||||
const reFetch = () => {
|
||||
|
||||
setIsLoading(true);
|
||||
executeQuery(query).then((result) => {
|
||||
if("rows" in result[0]) {
|
||||
|
|
@ -16,7 +15,7 @@ const useFetch = (query: Query) => {
|
|||
}
|
||||
}).catch((error: any) => {
|
||||
console.error("Fetching data from database has failed: ", error);
|
||||
}).finally(() => {
|
||||
}).then(() => {
|
||||
setIsLoading(false);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue