Skip to content

Commit 7aca45c

Browse files
committed
Fix preview SSE screenshot not hiding
1 parent a946e07 commit 7aca45c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/app/src/app/components/Preview/elements.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ export const Loading = styled.div`
4141
color: white;
4242
line-height: 1.3;
4343
text-align: center;
44+
45+
z-index: 10;
4446
`;

packages/app/src/app/components/Preview/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ class BasePreview extends React.Component<Props, State> {
191191
this.connectTimeout = null;
192192
this.localClose = false;
193193
this.setupSSESockets();
194+
195+
setTimeout(() => {
196+
// Remove screenshot after specific time, so the loading container spinner can still show
197+
this.setState({ showScreenshot: false });
198+
}, 100);
194199
}
195200
this.listener = listen(this.handleMessage);
196201

0 commit comments

Comments
 (0)