#302 - Spinner fix

This commit is contained in:
Elio Struyf
2022-03-30 09:59:49 +02:00
parent cb93370f59
commit ce331f12fb
2 changed files with 8 additions and 2 deletions
-2
View File
@@ -24,8 +24,6 @@ export const ViewPanel: React.FunctionComponent<IViewPanelProps> = (props: React
);
}
console.log(loading)
if (loading) {
return (
<Spinner />
+8
View File
@@ -46,6 +46,14 @@ export default function useMessages() {
}
});
useEffect(() => {
if (loading) {
window.setTimeout(() => {
setLoading(false);
}, 5000);
}
}, [loading])
useEffect(() => {
setLoading(true);