Skip to content

Commit

Permalink
don't render app before splash screen closed (#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiya1155 authored Aug 30, 2023
1 parent c2991ff commit 49b2695
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions apps/desktop/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<body data-theme="default">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script>
document.body.dataset['theme'] = localStorage.getItem('theme');
</script>
</body>

</html>
4 changes: 3 additions & 1 deletion apps/desktop/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ function App() {
<TextSearch contentRoot={contentContainer.current} />
<div ref={contentContainer}>
<BrowserRouter>
<ClientApp deviceContextValue={deviceContextValue} />
{!shouldShowSplashScreen && (
<ClientApp deviceContextValue={deviceContextValue} />
)}
</BrowserRouter>
</div>
</LocaleContext.Provider>
Expand Down

0 comments on commit 49b2695

Please sign in to comment.