File tree Expand file tree Collapse file tree
src/sections/Community/Handbook/handbook-single Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React from "react" ;
22import { Link } from "gatsby" ;
3- import { PaginationWrapper } from "../../../components/handbook-navigation/TocPagination.style" ;
3+ import TocPaginationWrapper from "../../../components/handbook-navigation/TocPagination.style" ;
44import Button from "../../../reusecore/Button" ;
55
66const HandbookPagination = ( { pages, currentSlug } ) => {
@@ -9,22 +9,18 @@ const HandbookPagination = ({ pages, currentSlug }) => {
99 const nextPage = currentIndex < pages . length - 1 ? pages [ currentIndex + 1 ] : null ;
1010
1111 return (
12- < PaginationWrapper >
13- < div className = "previous-page" >
14- { prevPage && (
15- < Link to = { prevPage . fields . slug } >
16- < Button $secondary title = "Previous" />
17- </ Link >
18- ) }
19- </ div >
20- < div className = "next-page" >
21- { nextPage && (
22- < Link to = { nextPage . fields . slug } >
23- < Button $primary title = "Next" />
24- </ Link >
25- ) }
26- </ div >
27- </ PaginationWrapper >
12+ < TocPaginationWrapper >
13+ { prevPage && (
14+ < Button $secondary $url = { prevPage . fields . slug } >
15+ ← Previous
16+ </ Button >
17+ ) }
18+ { nextPage && (
19+ < Button $primary $url = { nextPage . fields . slug } >
20+ Next →
21+ </ Button >
22+ ) }
23+ </ TocPaginationWrapper >
2824 ) ;
2925} ;
3026
Original file line number Diff line number Diff line change 11import React from "react" ;
22import { Link } from "gatsby" ;
3- import { TocWrapper } from "../../../components/handbook-navigation/toc.style" ;
3+ import TOCWrapper from "../../../components/handbook-navigation/toc.style" ;
44import { HiOutlineChevronLeft } from "@react-icons/all-files/hi/HiOutlineChevronLeft" ;
55
66const HandbookTOC = ( { pages, currentSlug } ) => {
77 return (
8- < TocWrapper >
9- < div className = "toc-list go-top " >
10- < h3 >
8+ < TOCWrapper >
9+ < div className = "go-back " >
10+ < Link to = "/community/handbook" >
1111 < HiOutlineChevronLeft />
12- Table Of Contents
13- </ h3 >
14- < ul >
12+ < h4 > Table of Contents</ h4 >
13+ </ Link >
14+ </ div >
15+ < div className = "toc-list" >
16+ < ul className = "toc-ul" >
1517 { pages . map ( ( page , index ) => (
16- < li key = { index } className = { currentSlug === page . fields . slug ? "active" : "" } >
17- < Link to = { page . fields . slug } >
18+ < li key = { index } >
19+ < Link
20+ to = { page . fields . slug }
21+ className = "toc-sub-heading toc-sub-inline"
22+ activeClassName = "active"
23+ >
1824 { page . frontmatter . title }
1925 </ Link >
2026 </ li >
2127 ) ) }
2228 </ ul >
2329 </ div >
24- </ TocWrapper >
30+ </ TOCWrapper >
2531 ) ;
2632} ;
2733
You can’t perform that action at this time.
0 commit comments