chore: Add loading message

This commit is contained in:
Sidharth Vinod
2022-11-01 21:51:27 +05:30
parent 8910b15886
commit 8d20a66266
+2
View File
@@ -3,6 +3,7 @@ import { analytics, initAnalytics } from './stats';
import { loadDataFromUrl } from './fileLoaders/loader';
import { initLoading } from './loading';
import { applyMigrations } from './migrations';
import { init } from './mermaid';
export const loadStateFromURL = (): void => {
loadState(window.location.hash.slice(1));
@@ -16,6 +17,7 @@ export const syncDiagram = (): void => {
export const initHandler = async (): Promise<void> => {
applyMigrations();
await initLoading('Loading Mermaid...', init());
loadStateFromURL();
await initLoading('Loading Gist...', loadDataFromUrl().catch(console.error));
syncDiagram();