diff --git a/src/components/PageNavigation/index.tsx b/src/components/PageNavigation/index.tsx index fd14a83..c9b4371 100644 --- a/src/components/PageNavigation/index.tsx +++ b/src/components/PageNavigation/index.tsx @@ -19,9 +19,7 @@ export const PageNavigation: FC = ({ previous, next }) => { Previous - - {previous.title} - + {previous.title} ) : ( @@ -31,9 +29,7 @@ export const PageNavigation: FC = ({ previous, next }) => { Next - - {next.title} - + {next.title} diff --git a/src/templates/resourcePage.tsx b/src/templates/resourcePage.tsx index 4552f67..fb3831d 100644 --- a/src/templates/resourcePage.tsx +++ b/src/templates/resourcePage.tsx @@ -33,15 +33,18 @@ const ResourcePage: FC = ({ data }) => { toc.length ) - const pages = sortWith([ - descend((f: any) => { - if (f.node.relativePath.includes("intro")) { - return 1; - } + const pages = sortWith( + [ + descend((f: any) => { + if (f.node.relativePath.includes("intro")) { + return 1 + } - return -1; - }) - ], data.allFile.edges) + return -1 + }), + ], + data.allFile.edges + ) const currentIndex = pages.findIndex( (x: any) => x.node.relativePath === relativePath )