Skip to content

Commit

Permalink
#4 fix: MoveButton 의 비공개 포스트 화면 표시 현상 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
msung99 committed Mar 8, 2024
1 parent 7bf063f commit c20c0fc
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/templates/Post.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default ({ data, location }) => {
};



export const pageQuery = graphql`
query BlogPostBySlug(
$id: String!
Expand All @@ -59,22 +60,31 @@ export const pageQuery = graphql`
tags
series
previewImage
isPrivate
}
}
previous: markdownRemark(id: { eq: $previousPostId }) {
previous: markdownRemark(
id: { eq: $previousPostId }
frontmatter: { isPrivate: { ne: true } }
) {
fields {
slug
}
frontmatter {
title
isPrivate
}
}
next: markdownRemark(id: { eq: $nextPostId }) {
next: markdownRemark(
id: { eq: $nextPostId }
frontmatter: { isPrivate: { ne: true } }
) {
fields {
slug
}
frontmatter {
title
isPrivate
}
}
}
Expand Down

0 comments on commit c20c0fc

Please sign in to comment.