Skip to content

Commit 13ad591

Browse files
committed
Revert "Add support for previewwindow= and prevent duplication"
This reverts commit cc2e0fa.
1 parent cc2e0fa commit 13ad591

File tree

1 file changed

+0
-19
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Content

1 file changed

+0
-19
lines changed

packages/app/src/app/pages/Sandbox/Editor/Content/index.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import { Prompt } from 'react-router-dom';
55
import { reaction } from 'mobx';
66
import { TextOperation } from 'ot';
77
import { inject, observer } from 'mobx-react';
8-
import { uniqBy } from 'lodash-es';
98

10-
import { getSandboxOptions } from '@codesandbox/common/lib/url';
119
import getTemplateDefinition from '@codesandbox/common/lib/templates';
1210
import type { ModuleError } from '@codesandbox/common/lib/types';
1311
import { getPreviewTabs } from '@codesandbox/common/lib/templates/devtools';
@@ -470,28 +468,11 @@ class EditorPreview extends React.Component<Props, State> {
470468
}
471469
}
472470

473-
const sandboxOptions = getSandboxOptions(location.href);
474-
if (
475-
(sandboxOptions.previewWindow &&
476-
sandboxOptions.previewWindow === 'tests') ||
477-
sandboxOptions.previewWindow === 'console'
478-
) {
479-
// Backwards compatibility for ?previewwindow=
480-
481-
view = sandboxOptions.previewWindow;
482-
}
483-
484471
if (view !== 'browser') {
485472
// Backwards compatibility for sandbox.config.json
486473
if (view === 'console') {
487-
views[0].views = views[0].views.filter(
488-
t => t.id !== 'codesandbox.console'
489-
);
490474
views[0].views.unshift({ id: 'codesandbox.console' });
491475
} else if (view === 'tests') {
492-
views[0].views = views[0].views.filter(
493-
t => t.id !== 'codesandbox.tests'
494-
);
495476
views[0].views.unshift({ id: 'codesandbox.tests' });
496477
}
497478
}

0 commit comments

Comments
 (0)