Signed-off-by: Traxus <shyidx@gmail.com>

This commit is contained in:
Traxus
2023-04-25 00:41:29 -04:00
parent 0bba1348ad
commit 985febebd9
2 changed files with 13 additions and 9 deletions
+2 -1
View File
@@ -130,7 +130,8 @@ export const getStaticProps: GetStaticProps = async (
relatedBlogPostsFromSource = allBlogPosts.data.filter((p) =>
p.category.some((c) =>
post?.category.some(
(postCategory: any) => c.slug === postCategory.slug)
(postCategory: any) => c.slug === postCategory.slug
)
)
)
}
+4 -1
View File
@@ -121,7 +121,10 @@ const BlogIndexPage = ({
let queriedPostsHasResults = false
if (typeof queriedPosts !== 'undefined' && 'pages' in queriedPosts === true) {
if (
typeof queriedPosts !== 'undefined' &&
'pages' in queriedPosts === true)
{
if (0 in queriedPosts.pages === true) {
if ('pagination' in queriedPosts.pages[0]) {
if ('total' in queriedPosts.pages[0].pagination) {