diff --git a/src/App.web.tsx b/src/App.web.tsx index bc9cd01f..661cac72 100644 --- a/src/App.web.tsx +++ b/src/App.web.tsx @@ -86,9 +86,15 @@ function InnerApp() { function App() { const [isReady, setReady] = useState(false) - + React.useEffect(() => { - initPersistedState().then(() => setReady(true)) + initPersistedState().then(() => { + setReady(true) + + const preloadElement = document.getElementById('preload'); + preloadElement.remove(); + }) + }, []) if (!isReady) { diff --git a/web/index.html b/web/index.html index b059e69e..11d5b966 100644 --- a/web/index.html +++ b/web/index.html @@ -51,6 +51,14 @@ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Liberation Sans", Helvetica, Arial, sans-serif; } + #preload { + width: 100px; + position: fixed; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + } + /* Buttons and inputs have a font set by UA, so we'll have to reset that */ button, input, textarea { font: inherit; @@ -301,6 +309,11 @@ +