Content-Length: 337529 | pFad | http://github.com/usememos/dotcom/commit/#start-of-content

68846D1B chore: remove toc of docs · usememos/dotcom@4db29d1 · GitHub
Skip to content

Commit 4db29d1

Browse files
committed
chore: remove toc of docs
1 parent 8d040d8 commit 4db29d1

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

src/app/docs/[[...slug]]/page.tsx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import ContentRender from "@/components/ContentRender";
88
import Icon from "@/components/Icon";
99
import SectionContainer from "@/components/SectionContainer";
1010
import Subscription from "@/components/Subscription";
11-
import TableOfContent from "@/components/TableOfContent";
1211
import { GITHUB_REPO_LINK } from "@/consts/common";
1312
import { getContentFilePaths, getFilePathFromSlugs, readFileContenxt } from "@/lib/content";
1413
import { markdoc } from "@/markdoc/markdoc";
@@ -33,24 +32,17 @@ const Page = async (props: Props) => {
3332
return null;
3433
}
3534

36-
const children = transformedContent.children;
37-
const headings = JSON.parse(
38-
JSON.stringify(
39-
children.filter((child) => child instanceof Tag && child.name === "Heading" && [2, 3].includes(child.attributes["level"])),
40-
),
41-
) as Tag[];
42-
4335
return (
4436
<SectionContainer>
4537
<div className="w-full flex flex-row justify-start items-start sm:px-6 sm:gap-6">
46-
<div className="hidden sm:block sticky top-24 h-[calc(100svh-6rem)] w-40 shrink-0">
38+
<div className="hidden sm:block sticky top-24 h-[calc(100svh-6rem)] w-48 shrink-0">
4739
<div className="relative w-full h-full overflow-auto py-4 no-scrollbar">
4840
<Navigation />
4941
</div>
5042
<div className="absolute top-0 left-0 w-full h-8 bg-linear-to-t from-transparent to-white pointer-events-none"></div>
5143
<div className="absolute bottom-0 left-0 w-full h-8 bg-linear-to-b from-transparent to-white pointer-events-none"></div>
5244
</div>
53-
<div className="w-full sm:max-w-[calc(100%-10rem)] lg:max-w-[calc(100%-20rem)] sm:px-4">
45+
<div className="w-full sm:px-4">
5446
<div className="block sm:hidden w-full">
5547
<NavigationMobileMenu />
5648
</div>
@@ -66,13 +58,6 @@ const Page = async (props: Props) => {
6658
<Divider className="my-12!" />
6759
<Subscription />
6860
</div>
69-
<div className="hidden lg:block sticky top-24 h-[calc(100svh-6rem)] w-40 shrink-0">
70-
<div className="relative w-full h-full overflow-auto py-4 no-scrollbar">
71-
<TableOfContent headings={headings} />
72-
</div>
73-
<div className="absolute top-0 left-0 w-full h-8 bg-linear-to-t from-transparent to-white"></div>
74-
<div className="absolute bottom-0 left-0 w-full h-8 bg-linear-to-b from-transparent to-white"></div>
75-
</div>
7661
</div>
7762
</SectionContainer>
7863
);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/usememos/dotcom/commit/#start-of-content

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy