添加服务端运行警告

This commit is contained in:
2026-04-09 15:46:54 +08:00
parent 2de3841f7d
commit cd689aba98
7 changed files with 43 additions and 24 deletions

View File

@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react'
import Markdoc, { type RenderableTreeNode } from '@markdoc/markdoc'
import { toMarkdocTree } from '../lib/markdoc'
import { renderMarkdocTree } from '../lib/markdoc'
import { CodeBlock } from './markdoc/CodeBlock.tsx'
export const MarkdocContent: React.FC<{
@ -11,7 +11,7 @@ export const MarkdocContent: React.FC<{
useEffect(() => {
let active = true
toMarkdocTree(content).then((result) => {
renderMarkdocTree(content).then((result) => {
if (active) setTree(result)
})
return () => {