MCPcopy Create free account
hub / github.com/editablejs/editable / Layout

Function Layout

apps/docs/src/pages/[[...markdownPath]].js:7–18  ·  view source on GitHub ↗
({ content, toc, meta })

Source from the content-addressed store, hash-verified

5import { join } from 'path'
6
7export default function Layout({ content, toc, meta }) {
8 const parsedContent = useMemo(() => JSON.parse(content, reviveNodeOnClient), [content])
9 const parsedToc = useMemo(() => JSON.parse(toc, reviveNodeOnClient), [toc])
10
11 return (
12 <Page toc={parsedToc}>
13 <MarkdownPage meta={meta} toc={parsedToc}>
14 {parsedContent}
15 </MarkdownPage>
16 </Page>
17 )
18}
19
20// Deserialize a client React tree from JSON.
21function reviveNodeOnClient(key, val) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…