File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
packages/app/src/app/pages/Dashboard/Content/SandboxCard Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -121,11 +121,15 @@ class SandboxItemComponent extends React.PureComponent<Props, State> {
121121 } ;
122122
123123 checkScreenshot ( ) {
124- if ( this . props . screenshotOutdated && this . hasScreenshot ( ) ) {
125- // We only request the screenshot if the sandbox card is in view for > 1 second
126- this . screenshotTimeout = window . setTimeout ( ( ) => {
127- this . requestScreenshot ( ) ;
128- } , 1000 ) ;
124+ if ( this . props . screenshotOutdated ) {
125+ if ( this . hasScreenshot ( ) ) {
126+ // We only request the screenshot if the sandbox card is in view for > 1 second
127+ this . screenshotTimeout = window . setTimeout ( ( ) => {
128+ this . requestScreenshot ( ) ;
129+ } , 1000 ) ;
130+ }
131+ } else {
132+ this . setState ( { screenshotUrl : this . props . screenshotUrl } ) ;
129133 }
130134 }
131135
@@ -266,9 +270,7 @@ class SandboxItemComponent extends React.PureComponent<Props, State> {
266270 action : ( ) => {
267271 if ( this . props . collectionTeamId ) {
268272 history . push (
269- `/dashboard/teams/${ this . props . collectionTeamId } /sandboxes${
270- this . props . collectionPath
271- } `
273+ `/dashboard/teams/${ this . props . collectionTeamId } /sandboxes${ this . props . collectionPath } `
272274 ) ;
273275 } else {
274276 history . push ( `/dashboard/sandboxes${ this . props . collectionPath } ` ) ;
You can’t perform that action at this time.
0 commit comments