File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 11import Markdown , { Components } from "react-markdown" ;
22import remarkGfm from "remark-gfm" ;
3- import SyntaxHighlighter from "react-syntax-highlighter" ;
43import { EditorComponent , getAceLang } from "../terminal/editor" ;
54import { ExecFile } from "../terminal/exec" ;
65import { useChangeTheme } from "./themeToggle" ;
@@ -11,6 +10,9 @@ import {
1110import { ReactNode } from "react" ;
1211import { getRuntimeLang } from "@/terminal/runtime" ;
1312import { ReplTerminal } from "@/terminal/repl" ;
13+ import dynamic from "next/dynamic" ;
14+ // SyntaxHighlighterはファイルサイズがでかいので & HydrationErrorを起こすので、SSRを無効化する
15+ const SyntaxHighlighter = dynamic ( ( ) => import ( "react-syntax-highlighter" ) , { ssr : false } ) ;
1416
1517export function StyledMarkdown ( { content } : { content : string } ) {
1618 return (
You can’t perform that action at this time.
0 commit comments