Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Commit 79e1310

Browse files
SSR not yet ready
1 parent 7f63bcc commit 79e1310

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/editor/consoleLog.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,6 @@ const LogsContainer = ({
5555
);
5656
};
5757

58+
type logsType = typeof LogsContainer
59+
export {logsType}
5860
export default LogsContainer;

src/editor/monacoEditor.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ import {
2323
setRunnerModel,
2424
} from './mountFunctions';
2525
import runFile, { runTestFile } from './utils/runFile';
26-
if (typeof window !== 'undefined') {
27-
var ConsoleLog = require('./consoleLog').default;
28-
}
26+
import Console, {logsType} from "./consoleLog"
2927

3028
type MonacoEditorProps = {
3129
id: string;
@@ -133,12 +131,12 @@ function App({
133131
/>
134132
</div>
135133
<div style={{ backgroundColor: '#242424' }}>
136-
{typeof ConsoleLog !== 'undefined' && (
137-
<ConsoleLog
134+
{Console && (
135+
<Console
138136
onSuccess={onSuccess}
139137
onFailure={onFailure}
140138
editorId={id}
141-
></ConsoleLog>
139+
></Console>
142140
)}
143141
</div>
144142
</div>

0 commit comments

Comments
 (0)