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

This commit is contained in:
Traxus 2023-04-21 22:03:02 -04:00
parent acd5bb403d
commit 2516aba9fd

View File

@ -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)
)
)