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' ;
@@ -426,20 +427,22 @@ export const Repl: Component<ReplProps> = (props) => {
426
427
}
427
428
>
428
429
< MonacoTabs tabs = { props . tabs } compiled = { store . compiled } folder = { props . id } />
429
- < Editor
430
- url = { `file:///${ props . id } /${ 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
- />
430
+ < Show when = { ! isServer } >
431
+ < Editor
432
+ url = { `file:///${ props . id } /${ props . current } ` }
433
+ onDocChange = { handleDocChange }
434
+ class = "h-full focus:outline-none bg-blueGray-50 dark:bg-blueGray-800 row-start-2"
435
+ styles = { { backgroundColor : '#F8FAFC' } }
436
+ disabled = { ! props . interactive }
437
+ canCopy
438
+ canFormat
439
+ formatter = { formatter }
440
+ isDark = { props . dark }
441
+ withMinimap = { false }
442
+ showActionBar = { props . actionBar }
443
+ ref = { props . onEditorReady }
444
+ />
445
+ </ Show >
443
446
444
447
< GridResizer
445
448
ref = { ( el ) => setVerticalResizer ( el ) }
@@ -457,7 +460,7 @@ export const Repl: Component<ReplProps> = (props) => {
457
460
onResize = { changeLeft }
458
461
/>
459
462
460
- < Show when = { ! showPreview ( ) } >
463
+ < Show when = { ! isServer && ! showPreview ( ) } >
461
464
< section
462
465
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
466
classList = { { 'md:row-start-2' : ! props . isHorizontal } }
0 commit comments