Fix: refresh

This commit is contained in:
Jakob Stornig 2024-01-25 16:11:04 +01:00
parent 4ddc76faa4
commit c46eec06a5
4 changed files with 15 additions and 10 deletions

View file

@ -28,7 +28,6 @@ const useFetch = (query: Query) => {
const reFetch = () => {
console.log("refetch called")
setIsLoading(true);
executeQuery(query).then((result) => {
if("rows" in result[0]) {
@ -36,7 +35,6 @@ const useFetch = (query: Query) => {
if(result[0]["rows"].length == 0){
setIsEmptyResult(true);
}
console.log("len", result[0]["rows"].length)
}
}).catch((error: any) => {
console.error("Fetching data from database has failed: ", error);