Skip to content

Commit

Permalink
ui: fix errors doesn't display (#794)
Browse files Browse the repository at this point in the history
  • Loading branch information
baurine authored Nov 13, 2020
1 parent 0f22ecb commit 1ff0f33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ui/lib/apps/SlowQuery/utils/useSlowQueryTableController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default function useSlowQueryTableController(
})
setAllSchemas(res?.data || [])
} catch (e) {
setErrors((prev) => [...prev, { ...e }])
setErrors((prev) => prev.concat(e))
}
}
querySchemas()
Expand Down Expand Up @@ -157,7 +157,7 @@ export default function useSlowQueryTableController(
setSlowQueries(res.data || [])
setErrors([])
} catch (e) {
setErrors((prev) => [...prev, { ...e }])
setErrors((prev) => prev.concat(e))
}
setLoadingSlowQueries(false)
}
Expand Down
10 changes: 5 additions & 5 deletions ui/lib/apps/Statement/utils/useStatementTableController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default function useStatementTableController(
})
setEnable(res?.data.enable!)
} catch (e) {
setErrors((prev) => [...prev, { ...e }])
setErrors((prev) => prev.concat(e))
}
}

Expand All @@ -145,7 +145,7 @@ export default function useStatementTableController(
})
setAllSchemas(res?.data || [])
} catch (e) {
setErrors((prev) => [...prev, { ...e }])
setErrors((prev) => prev.concat(e))
}
}

Expand All @@ -156,7 +156,7 @@ export default function useStatementTableController(
})
setAllTimeRanges(res?.data || [])
} catch (e) {
setErrors((prev) => [...prev, { ...e }])
setErrors((prev) => prev.concat(e))
}
}

Expand All @@ -167,7 +167,7 @@ export default function useStatementTableController(
})
setAllStmtTypes(res?.data || [])
} catch (e) {
setErrors((prev) => [...prev, { ...e }])
setErrors((prev) => prev.concat(e))
}
}

Expand Down Expand Up @@ -213,7 +213,7 @@ export default function useStatementTableController(
setStatements(res?.data || [])
setErrors([])
} catch (e) {
setErrors((prev) => [...prev, { ...e }])
setErrors((prev) => prev.concat(e))
}
setLoadingStatements(false)
}
Expand Down

0 comments on commit 1ff0f33

Please sign in to comment.