mirror of
https://github.com/LaconicNetwork/laconic.com.git
synced 2026-04-25 17:24:07 +00:00
Signed-off-by: Traxus <shyidx@gmail.com>
This commit is contained in:
parent
acd5bb403d
commit
2516aba9fd
@ -80,13 +80,18 @@ export const getStaticPaths: GetStaticPaths = async () => {
|
||||
|
||||
const posts = await postsSlugsJsonFromSource();
|
||||
|
||||
//===== /\ FINISH NEXT_PUBLIC_DATOCMS_BYPASS /\ ====================================================
|
||||
|
||||
/*
|
||||
const paths = posts?.map((post) => ({
|
||||
params: { slug: post.slug as string }
|
||||
}))
|
||||
*/
|
||||
|
||||
const paths = posts?.map((post : any) => ({
|
||||
params: { slug: post.slug as string }
|
||||
}))
|
||||
|
||||
//===== /\ FINISH NEXT_PUBLIC_DATOCMS_BYPASS /\ ====================================================
|
||||
|
||||
return { paths, fallback: 'blocking' }
|
||||
}
|
||||
|
||||
@ -137,7 +142,7 @@ export const getStaticProps: GetStaticProps = async (
|
||||
|
||||
let relatedPosts = allBlogPosts.data.filter((p) =>
|
||||
p.category.some((c) =>
|
||||
post?.category.some((postCategory) => c.slug === postCategory.slug)
|
||||
post?.category.some((postCategory : any) => c.slug === postCategory.slug)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user