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 TocPaginationWrapper from "../../../../components/handbook-navigation/TocPagination.style" ;
3+ import { PaginationWrapper } from "../../../components/handbook-navigation/TocPagination.style" ;
4+ import Button from "../../../reusecore/Button" ;
45
56const HandbookPagination = ( { pages, currentSlug } ) => {
67 const currentIndex = pages . findIndex ( page => page . fields . slug === currentSlug ) ;
78 const prevPage = currentIndex > 0 ? pages [ currentIndex - 1 ] : null ;
89 const nextPage = currentIndex < pages . length - 1 ? pages [ currentIndex + 1 ] : null ;
910
1011 return (
11- < TocPaginationWrapper >
12- { prevPage && (
13- < Link to = { prevPage . fields . slug } className = "prev" >
14- ← { prevPage . frontmatter . title }
15- </ Link >
16- ) }
17- { nextPage && (
18- < Link to = { nextPage . fields . slug } className = "next" >
19- { nextPage . frontmatter . title } →
20- </ Link >
21- ) }
22- </ TocPaginationWrapper >
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 >
2328 ) ;
2429} ;
2530
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" ;
4+ import { HiOutlineChevronLeft } from "@react-icons/all-files/hi/HiOutlineChevronLeft" ;
45
56const HandbookTOC = ( { pages, currentSlug } ) => {
67 return (
7- < TOCWrapper >
8+ < TocWrapper >
89 < div className = "toc-list go-top" >
9- < h3 > Community Handbook</ h3 >
10+ < h3 >
11+ < HiOutlineChevronLeft />
12+ Table Of Contents
13+ </ h3 >
1014 < ul >
1115 { pages . map ( ( page , index ) => (
1216 < li key = { index } className = { currentSlug === page . fields . slug ? "active" : "" } >
@@ -17,7 +21,7 @@ const HandbookTOC = ({ pages, currentSlug }) => {
1721 ) ) }
1822 </ ul >
1923 </ div >
20- </ TOCWrapper >
24+ </ TocWrapper >
2125 ) ;
2226} ;
2327
You can’t perform that action at this time.
0 commit comments