File tree Expand file tree Collapse file tree 3 files changed +13
-18
lines changed Expand file tree Collapse file tree 3 files changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ import FileContributors from "@/components/FileContributors"
13
13
import { HubHero } from "@/components/Hero"
14
14
import type { HubHeroProps } from "@/components/Hero/HubHero"
15
15
import { Image , ImageProps } from "@/components/Image"
16
- import LeftNavBar from "@/components/LeftNavBar"
17
16
import MainArticle from "@/components/MainArticle"
18
17
import { ContentContainer } from "@/components/MdComponents"
18
+ import TableOfContents from "@/components/TableOfContents"
19
19
import { ButtonLink } from "@/components/ui/buttons/Button"
20
20
import { Center , Flex , Stack } from "@/components/ui/flex"
21
21
import InlineLink from "@/components/ui/Link"
@@ -185,11 +185,7 @@ export default async function Page({ params }: { params: Promise<Params> }) {
185
185
asChild
186
186
>
187
187
< MainArticle >
188
- < LeftNavBar
189
- tocItems = { tocData }
190
- // TODO: Remove `!` flag once this component is migrated to ShadCN
191
- className = "max-lg:!hidden"
192
- />
188
+ < TableOfContents items = { tocData } variant = "left" />
193
189
194
190
< ContentContainer id = "content" >
195
191
< Section
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ import Card from "@/components/Card"
13
13
import ExpandableCard from "@/components/ExpandableCard"
14
14
import FeedbackCard from "@/components/FeedbackCard"
15
15
import FileContributors from "@/components/FileContributors"
16
- import LeftNavBar from "@/components/LeftNavBar"
17
16
import { ContentContainer , Page } from "@/components/MdComponents"
18
17
import MobileButtonDropdown from "@/components/MobileButtonDropdown"
19
18
import PageHero from "@/components/PageHero"
20
19
import StakingCommunityCallout from "@/components/Staking/StakingCommunityCallout"
21
20
import StakingHierarchy from "@/components/Staking/StakingHierarchy"
22
21
import StakingStatsBox from "@/components/Staking/StakingStatsBox"
22
+ import TableOfContents from "@/components/TableOfContents"
23
23
import Translation from "@/components/Translation"
24
24
import {
25
25
ButtonLink ,
@@ -251,11 +251,10 @@ const StakingPage = ({
251
251
< StakingStatsBox data = { data } />
252
252
</ HeroStatsWrapper >
253
253
< Page >
254
- < LeftNavBar
254
+ < TableOfContents
255
+ items = { tocArray }
256
+ variant = "left"
255
257
dropdownLinks = { dropdownLinks }
256
- tocItems = { tocArray }
257
- // TODO: Remove bang after this component is migrated to Tailwind
258
- className = "max-lg:!hidden"
259
258
/>
260
259
< ContentContainer >
261
260
< Flex className = "mt-16 flex-col gap-16 lg:mt-0" >
Original file line number Diff line number Diff line change @@ -4,14 +4,16 @@ import { FileContributor } from "@/lib/types"
4
4
5
5
import FeedbackCard from "@/components/FeedbackCard"
6
6
import FileContributors from "@/components/FileContributors"
7
- import LeftNavBar , { LeftNavBarProps } from "@/components/LeftNavBar"
8
7
import { ContentContainer , Page } from "@/components/MdComponents"
9
8
import MobileButtonDropdown from "@/components/MobileButtonDropdown"
9
+ import TableOfContents , {
10
+ type TableOfContentsProps ,
11
+ } from "@/components/TableOfContents"
10
12
11
13
type ContentLayoutProps = HTMLAttributes < HTMLDivElement > &
12
- Pick < LeftNavBarProps , "dropdownLinks" | "tocItems" | "maxDepth" > & {
13
- showDropdown ?: boolean
14
+ Pick < TableOfContentsProps , "dropdownLinks" | "showDropdown" | "maxDepth" > & {
14
15
children : React . ReactNode
16
+ tocItems : TableOfContentsProps [ "items" ]
15
17
heroSection : React . ReactNode
16
18
contributors : FileContributor [ ]
17
19
lastEditLocaleTimestamp : string
@@ -33,14 +35,12 @@ export const ContentLayout = ({
33
35
{ heroSection }
34
36
35
37
< Page >
36
- < LeftNavBar
37
- className = "max-lg:hidden"
38
+ < TableOfContents
39
+ items = { tocItems }
38
40
dropdownLinks = { dropdownLinks }
39
- tocItems = { tocItems }
40
41
maxDepth = { maxDepth }
41
42
showDropdown = { showDropdown }
42
43
/>
43
-
44
44
< ContentContainer >
45
45
{ children }
46
46
You can’t perform that action at this time.
0 commit comments