fixed pagination, fixed cookiebar dark mode, fixed rendering issues during ssr, moved all test blog code to a test folder

This commit is contained in:
2022-09-17 23:16:13 +02:00
parent b82bef5e0f
commit 74082cd463
28 changed files with 176 additions and 237 deletions

View File

@@ -336,7 +336,7 @@ exports[`CategoryTemplate renders correctly 1`] = `
href="/typography/page/3"
rel="next"
>
NEXT
NEXT
</a>
</div>
</div>

View File

@@ -19,14 +19,11 @@ interface Props {
const IndexTemplate: React.FC<Props> = ({ data, pageContext }: Props) => {
const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata();
const { pagination } = pageContext;
const { currentPage, hasNextPage, hasPrevPage, prevPagePath, nextPagePath } =
pagination;
const { currentPage, hasNextPage, hasPrevPage, prevPagePath, nextPagePath } = pagination;
const { edges } = data.allMarkdownRemark;
const pageTitle =
currentPage > 0 ? `Posts - Page ${currentPage} - ${siteTitle}` : siteTitle;
const pageTitle = currentPage > 0 ? `Posts - Page ${currentPage} - ${siteTitle}` : siteTitle;
return (
<Layout title={pageTitle} description={siteSubtitle}>

View File

@@ -333,7 +333,7 @@ exports[`IndexTemplate renders correctly 1`] = `
href="/typography/page/3"
rel="next"
>
NEXT
NEXT
</a>
</div>
</div>

View File

@@ -336,7 +336,7 @@ exports[`TagTemplate renders correctly 1`] = `
href="/typography/page/3"
rel="next"
>
NEXT
NEXT
</a>
</div>
</div>