mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
Merge branch 'bug/hidden-page-navigator' into develop
This commit is contained in:
@@ -115,7 +115,7 @@ export async function getStaticProps({ params: { slug } }) {
|
||||
props.post.blockMap = await getPostBlocks(props.post.id, 'slug')
|
||||
}
|
||||
|
||||
const allPosts = props.allPages.filter(page => page.type === 'Post')
|
||||
const allPosts = props.allPages.filter(page => page.type === 'Post' && page.status === 'Published')
|
||||
const index = allPosts.indexOf(props.post)
|
||||
props.prev = allPosts.slice(index - 1, index)[0] ?? allPosts.slice(-1)[0]
|
||||
props.next = allPosts.slice(index + 1, index + 2)[0] ?? allPosts[0]
|
||||
|
||||
Reference in New Issue
Block a user