Display spinner animation during loading

This commit is contained in:
Zaid Abdulla committed 2021-02-16 00:09:24 -08:00
1 parent 4871613c67
commit 688811317c
23 files changed
+447 -307

No files matched your search

+7 -3
View File
@@ -67,12 +67,12 @@ const component: ClosureComponent = (): Component => {
.deleteResource("faults", f["_id"])
.then(() => {
notifications.push("success", "Fault deleted");
store.fulfill(Date.now(), Date.now());
store.setTimestamp(Date.now());
m.redraw();
})
.catch((err) => {
notifications.push("error", err.message);
store.fulfill(Date.now(), Date.now());
store.setTimestamp(Date.now());
});
},
},
@@ -95,7 +95,11 @@ const component: ClosureComponent = (): Component => {
);
}
return m("table.table", thead, tbody);
return m(
"loading",
{ queries: [faults] },
m("table.table", thead, tbody)
);
},
};
};