11'use client'
22
33import type { Doc } from '@/content'
4- import { useRef , useLayoutEffect , useState , useEffect } from 'react'
4+ import { useState , useEffect } from 'react'
55import Link from 'next/link'
66import { DocTracingBeam } from './DocTracingBeam'
77import { Button } from '../ui/button'
@@ -15,7 +15,13 @@ interface Toc {
1515 depth : number
1616}
1717
18- const DocToC = ( { doc } : { doc : Doc } ) => {
18+ const DocToC = ( {
19+ doc,
20+ startSteps,
21+ } : {
22+ doc : Doc
23+ startSteps ?: React . JSX . Element | undefined
24+ } ) => {
1925 const initial = 14
2026 const sectionSize = 28
2127 const offset = 10
@@ -58,8 +64,8 @@ const DocToC = ({ doc }: { doc: Doc }) => {
5864 } , [ ] )
5965
6066 return (
61- < div className = "hidden h-full min-w-52 md:block" >
62- < aside className = "sticky top-[calc(var(--header-height)+1px+2rem)] max-h-[calc(100vh-var(--header-height)-3rem)] min-w-40 space-y-6 " >
67+ < div className = "hidden h-full min-w-64 md:block" >
68+ < aside className = "sticky top-[calc(var(--header-height)+1px+2rem)] max-h-[calc(100vh-var(--header-height)-3rem)] space-y-8 " >
6369 { doc . toc . length ? (
6470 < div className = "relative flex flex-col" >
6571 < p className = "mb-2 font-mono text-sm uppercase dark:text-zinc-300" >
@@ -101,6 +107,17 @@ const DocToC = ({ doc }: { doc: Doc }) => {
101107 </ a >
102108 </ Button >
103109 </ div >
110+ { startSteps && (
111+ < div className = "flex flex-col" >
112+ < p className = "mb-2 font-mono text-sm uppercase dark:text-zinc-300" >
113+ Try this out
114+ </ p >
115+ < p className = "mb-2 text-2xs text-muted-foreground" >
116+ Run these commands in your terminal.
117+ </ p >
118+ { startSteps }
119+ </ div >
120+ ) }
104121 </ aside >
105122 </ div >
106123 )
0 commit comments