fix: delete table of content out from ui

This commit is contained in:
Buravit Yenjit 2025-04-04 23:20:09 +07:00
parent 983c3a77cd
commit 8152185d1f

View File

@ -133,25 +133,25 @@ export default function BlogPage() {
<div className="space-y-8"> <div className="space-y-8">
{/* Table of contents */} {/* Table of contents */}
<div className="sticky top-24"> <div className="sticky top-24">
<Card> {/*<Card>*/}
<CardHeader> {/* <CardHeader>*/}
<CardTitle>Table of Contents</CardTitle> {/* <CardTitle>Table of Contents</CardTitle>*/}
</CardHeader> {/* </CardHeader>*/}
<CardContent> {/* <CardContent>*/}
<nav className="space-y-2"> {/* <nav className="space-y-2">*/}
{blog.tableOfContents?.map((item) => ( {/* {blog.tableOfContents?.map((item) => (*/}
<button {/* <button*/}
key={item.id} {/* key={item.id}*/}
onClick={() => scrollToSection(item.id)} {/* onClick={() => scrollToSection(item.id)}*/}
className={`text-left w-full px-2 py-1 text-sm rounded-md hover:bg-muted transition-colors ${ {/* className={`text-left w-full px-2 py-1 text-sm rounded-md hover:bg-muted transition-colors ${*/}
item.level > 1 ? "ml-4" : "" {/* item.level > 1 ? "ml-4" : ""*/}
}`}> {/* }`}>*/}
{item.title} {/* {item.title}*/}
</button> {/* </button>*/}
))} {/* ))}*/}
</nav> {/* </nav>*/}
</CardContent> {/* </CardContent>*/}
</Card> {/*</Card>*/}
{/* Related articles */} {/* Related articles */}
{blog.relatedArticles && ( {blog.relatedArticles && (