Skip to content

Commit

Permalink
docs: remove pagination (#2377)
Browse files Browse the repository at this point in the history
The pagination code is currently broken as navItems are not passed along
components. Nobody noticed because we did not expect it to be there and
it's not a big deal. There's no logical reason to go to the "next" page.

Change-Id: I426f168a076f3a838c821533125bef3a23250dac
  • Loading branch information
jd authored Oct 3, 2023
1 parent 828be24 commit c1b65dc
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 109 deletions.
2 changes: 1 addition & 1 deletion gatsby-node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const onCreateNode = async ({node, getNode, loadNodeContent, actions}) =>

export const createPages = async ({actions, graphql}) => {
const pageTemplate = resolve("./src/templates/page.jsx")
const {createRedirect} = actions;
const {createRedirect} = actions;

redirects.forEach(redirect => {
createRedirect({
Expand Down
3 changes: 0 additions & 3 deletions src/components/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import ExpansionPanel, {
import { TOTAL_HEADER_HEIGHT } from './Header';
import InlineCode from './InlineCode';
import PageLayout, { usePageLayoutProps } from './PageLayout';
import Pagination from './Pagination';
import RelativeLink, { ButtonLink } from './RelativeLink';

import TableOfContents from './TableOfContents';
Expand Down Expand Up @@ -176,7 +175,6 @@ export default function Page({

const { frontmatter, headings } = childMdx || childMarkdownRemark;
const { title, description, toc } = frontmatter;
const { navItems } = pageContext;

const pageProps = usePageLayoutProps({
pageContext,
Expand Down Expand Up @@ -232,7 +230,6 @@ export default function Page({
{description}
</chakra.h2>
)}
pagination={<Pagination navItems={navItems} />}
aside={
toc !== false ? (
// hide the table of contents on the home page
Expand Down
3 changes: 0 additions & 3 deletions src/components/PageLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export default function Page({
children,
banner,
subtitle,
pagination,
aside,
paddingTop,
paddingBottom,
Expand Down Expand Up @@ -157,7 +156,6 @@ export default function Page({
<Box fontSize={{ md: 'lg' }} lineHeight={{ md: 1.7 }} {...contentProps}>
{children}
</Box>
{pagination}
</Box>
{aside}
</Flex>
Expand All @@ -174,7 +172,6 @@ Page.propTypes = {
paddingTop: PropTypes.string.isRequired,
paddingBottom: PropTypes.string.isRequired,
banner: PropTypes.element,
pagination: PropTypes.element,
aside: PropTypes.element,
subtitle: PropTypes.node,
description: PropTypes.string,
Expand Down
63 changes: 0 additions & 63 deletions src/components/Pagination/Pagination.jsx

This file was deleted.

37 changes: 0 additions & 37 deletions src/components/Pagination/PaginationButton.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/Pagination/index.jsx

This file was deleted.

0 comments on commit c1b65dc

Please sign in to comment.