mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Fix show refetch loading spinner (#2324)
This commit is contained in:
parent
2df4389aa0
commit
29e79eb9bb
1 changed files with 2 additions and 2 deletions
|
|
@ -227,14 +227,14 @@ const HostDetailsPage = ({
|
|||
|
||||
const onRefetchHost = async () => {
|
||||
if (host) {
|
||||
// Once the user clicks to refetch, the refetch loading spinner should continue spinning
|
||||
// unless there is an error or until the user refreshes the page.
|
||||
setShowRefetchLoadingSpinner(true);
|
||||
try {
|
||||
await hostAPI.refetch(host);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
dispatch(renderFlash("error", `Host "${host.hostname}" refetch error`));
|
||||
} finally {
|
||||
setShowRefetchLoadingSpinner(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue