Skip to content

Commit

Permalink
Fix preview SSE screenshot not hiding
Browse files Browse the repository at this point in the history
  • Loading branch information
CompuIves committed Dec 13, 2018
1 parent a946e07 commit 7aca45c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/app/src/app/components/Preview/elements.js
Expand Up @@ -41,4 +41,6 @@ export const Loading = styled.div`
color: white;
line-height: 1.3;
text-align: center;
z-index: 10;
`;
5 changes: 5 additions & 0 deletions packages/app/src/app/components/Preview/index.js
Expand Up @@ -191,6 +191,11 @@ class BasePreview extends React.Component<Props, State> {
this.connectTimeout = null;
this.localClose = false;
this.setupSSESockets();

setTimeout(() => {
// Remove screenshot after specific time, so the loading container spinner can still show
this.setState({ showScreenshot: false });
}, 100);
}
this.listener = listen(this.handleMessage);

Expand Down

0 comments on commit 7aca45c

Please sign in to comment.