添加服务端运行警告
This commit is contained in:
@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user