File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ import { EditorView } from '@codemirror/view';
1818
1919import { Blocks } from 'react-loader-spinner'
2020
21+ import useIsBrowser from '@docusaurus/useIsBrowser' ;
22+
23+
2124export const defaultLightThemeOption = EditorView . theme (
2225 {
2326 '&' : {
@@ -197,7 +200,10 @@ export default function Home() {
197200 const [ sourceLanguage , setSourceLanguage ] = useState ( languages . find ( l => l . code2 === "en" ) )
198201 const [ targetLanguage , setTargetLanguage ] = useState ( languages . find ( ( l ) => l . default ) ) ;
199202
200- const dummyOutputTerminal = document . getElementById ( "dummy-output-terminal" ) ;
203+
204+ const isBrowser = useIsBrowser ( ) ;
205+
206+ const dummyOutputTerminal = isBrowser && document . getElementById ( "dummy-output-terminal" ) ;
201207
202208 useEffect ( ( ) => {
203209 if ( ! dummyOutputTerminal ) return ;
You can’t perform that action at this time.
0 commit comments