MCPcopy
hub / github.com/code-hike/codehike / Page

Function Page

apps/web/demos/spotlight/page.tsx:20–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18})
19
20export default function Page() {
21 const { steps } = parseRoot(Content, Schema)
22 return (
23 <SelectionProvider className="flex ">
24 <div className="flex-1 mt-4 ml-2 prose prose-invert prose-h2:mt-4">
25 {steps.map((step, i) => (
26 <Selectable
27 key={i}
28 index={i}
29 selectOn={["click"]}
30 className="border border-zinc-700 data-[selected=true]:border-blue-400 px-5 py-2 mb-4 rounded bg-zinc-900 cursor-pointer hover:bg-zinc-800 transition-colors duration-200 ease-in-out"
31 >
32 <h2 className="text-xl">{step.title}</h2>
33 <div>{step.children}</div>
34 </Selectable>
35 ))}
36 </div>
37 <div className="w-[40vw] max-w-xl ">
38 <div className="top-16 sticky overflow-auto h-full p-4">
39 <Selection
40 from={steps.map((step) => (
41 <Code codeblock={step.code} />
42 ))}
43 />
44 </div>
45 </div>
46 </SelectionProvider>
47 )
48}
49
50async function Code({ codeblock }: { codeblock: RawCode }) {
51 const highlighted = await highlight(

Callers

nothing calls this directly

Calls 1

parseRootFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…