Skip to content

Commit 34dd160

Browse files
committed
[TOOL-3095] Portal: Enable Table of contents in Nebula pages
1 parent 00f1d29 commit 34dd160

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

apps/portal/src/app/nebula/layout.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ import { sidebar } from "./sidebar";
44

55
export default async function Layout(props: { children: React.ReactNode }) {
66
return (
7-
<DocLayout
8-
sideBar={sidebar}
9-
editPageButton={true}
10-
showTableOfContents={false}
11-
>
7+
<DocLayout sideBar={sidebar} editPageButton={true}>
128
{props.children}
139
</DocLayout>
1410
);

apps/portal/src/components/others/TableOfContents.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ export function TableOfContentsSideBar(props: {
6060
return;
6161
}
6262

63+
setHideNav(false);
64+
6365
// when heading's intersection changes, update corresponding link's data-active attribute to true/false
6466
const observer = new IntersectionObserver(
6567
(entries) => {
@@ -111,6 +113,8 @@ export function TableOfContentsSideBar(props: {
111113
};
112114
}, [filterHeading, pathname]);
113115

116+
console.log("nodes", nodes);
117+
114118
return (
115119
<nav
116120
className={cn(
@@ -175,7 +179,7 @@ function TOCLink(props: {
175179
return (
176180
<Link
177181
className={cn(
178-
"block overflow-hidden text-ellipsis font-medium text-f-300 transition-colors hover:text-f-100 data-[active='true']:text-accent-500",
182+
"block overflow-hidden text-ellipsis font-medium text-f-300 transition-colors hover:text-f-100 data-[active='true']:text-f-100",
179183
props.linkClassName,
180184
)}
181185
href={props.href}

0 commit comments

Comments
 (0)