1
1
import { Component , Show , For , Suspense , createSignal , createEffect , lazy , batch } from 'solid-js' ;
2
+ import { isServer } from 'solid-js/web' ;
2
3
import { Icon } from '@amoutonbrady/solid-heroicons' ;
3
4
import { refresh } from '@amoutonbrady/solid-heroicons/outline' ;
4
5
import { unwrap , createStore } from 'solid-js/store' ;
@@ -11,7 +12,6 @@ import { Error } from './error';
11
12
12
13
import type { Tab } from '../' ;
13
14
import { debounce } from '../utils/debounce' ;
14
- import { throttle } from '../utils/throttle' ;
15
15
import { formatMs } from '../utils/formatTime' ;
16
16
17
17
import MonacoTabs from './monacoTabs' ;
@@ -426,21 +426,22 @@ export const Repl: Component<ReplProps> = (props) => {
426
426
}
427
427
>
428
428
< MonacoTabs tabs = { props . tabs } compiled = { store . compiled } />
429
- < Editor
430
- url = { `file:///${ props . current } ` }
431
- onDocChange = { handleDocChange }
432
- class = "h-full focus:outline-none bg-blueGray-50 dark:bg-blueGray-800 row-start-2"
433
- styles = { { backgroundColor : '#F8FAFC' } }
434
- disabled = { ! props . interactive }
435
- canCopy
436
- canFormat
437
- formatter = { formatter }
438
- isDark = { props . dark }
439
- withMinimap = { false }
440
- showActionBar = { props . actionBar }
441
- ref = { props . onEditorReady }
442
- />
443
-
429
+ < Show when = { ! isServer } >
430
+ < Editor
431
+ url = { `file:///${ props . current } ` }
432
+ onDocChange = { handleDocChange }
433
+ class = "h-full focus:outline-none bg-blueGray-50 dark:bg-blueGray-800 row-start-2"
434
+ styles = { { backgroundColor : '#F8FAFC' } }
435
+ disabled = { ! props . interactive }
436
+ canCopy
437
+ canFormat
438
+ formatter = { formatter }
439
+ isDark = { props . dark }
440
+ withMinimap = { false }
441
+ showActionBar = { props . actionBar }
442
+ ref = { props . onEditorReady }
443
+ />
444
+ </ Show >
444
445
< GridResizer
445
446
ref = { ( el ) => setVerticalResizer ( el ) }
446
447
isHorizontal = { props . isHorizontal }
@@ -457,7 +458,7 @@ export const Repl: Component<ReplProps> = (props) => {
457
458
onResize = { changeLeft }
458
459
/>
459
460
460
- < Show when = { ! showPreview ( ) } >
461
+ < Show when = { ! isServer && ! showPreview ( ) } >
461
462
< section
462
463
class = "h-full max-h-screen bg-white dark:bg-blueGray-800 grid focus:outline-none row-start-5 relative divide-y-2 divide-blueGray-200 dark:divide-blueGray-500"
463
464
classList = { { 'md:row-start-2' : ! props . isHorizontal } }
0 commit comments