bug: fix show featured blogs

This commit is contained in:
Quangnhankie
2021-10-20 10:56:34 +07:00
parent 7ea734d0ad
commit 5b5aeec0d2
4 changed files with 31 additions and 12 deletions

View File

@@ -46,7 +46,12 @@ export async function getStaticProps({
const {featuredBlogs} = await commerce.getFeaturedBlog({
variables: {
take: DEFAULT_BLOG_PAGE_SIZE
take: DEFAULT_BLOG_PAGE_SIZE,
filter: {
isFeatured: {
eq:true
}
}
},
config,
preview,
@@ -57,7 +62,12 @@ export async function getStaticProps({
const blogsPromise = commerce.getAllBlogs({
variables: {
excludeBlogIds: [idFeaturedBlog],
take: DEFAULT_BLOG_PAGE_SIZE
take: DEFAULT_BLOG_PAGE_SIZE,
filter: {
isFeatured: {
eq:false
}
}
},
config,
preview,