Skip to content

Commit

Permalink
Fix for preview window bug, v1.0.0-rc7.1
Browse files Browse the repository at this point in the history
Need to wait for the stores to be initialized before rendering
  • Loading branch information
RvanderLaan committed Mar 7, 2022
1 parent 148d70f commit 4438c35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "allusion",
"productName": "Allusion",
"version": "1.0.0-rc7",
"version": "1.0.0-rc7.1",
"description": "A tool for managing your visual library",
"main": "build/main.bundle.js",
"scripts": {
Expand Down
5 changes: 5 additions & 0 deletions src/frontend/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { IconSet, Toggle } from 'widgets';
import { Toolbar, ToolbarButton } from 'widgets/menus';

import { useWorkerListener } from './image/ThumbnailGeneration';
import SplashScreen from './containers/SplashScreen';

const PreviewApp = observer(() => {
const { uiStore, fileStore } = useStore();
Expand All @@ -35,6 +36,10 @@ const PreviewApp = observer(() => {
setTimeout(() => setIsInitializing(false), 1000);
}, [fileStore.fileListLastModified]);

if (!uiStore.isInitialized) {
return <SplashScreen />;
}

return (
<div
id="preview"
Expand Down

0 comments on commit 4438c35

Please sign in to comment.