mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-06-20 01:55:44 +02:00
#302 - Spinner fix
This commit is contained in:
@@ -24,8 +24,6 @@ export const ViewPanel: React.FunctionComponent<IViewPanelProps> = (props: React
|
||||
);
|
||||
}
|
||||
|
||||
console.log(loading)
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<Spinner />
|
||||
|
||||
@@ -46,6 +46,14 @@ export default function useMessages() {
|
||||
}
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (loading) {
|
||||
window.setTimeout(() => {
|
||||
setLoading(false);
|
||||
}, 5000);
|
||||
}
|
||||
}, [loading])
|
||||
|
||||
useEffect(() => {
|
||||
setLoading(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user