File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import PostLayout from '@/layouts/PostLayout'
1212import PostBanner from '@/layouts/PostBanner'
1313import { Metadata } from 'next'
1414import siteMetadata from '@/data/siteMetadata'
15+ import { notFound } from 'next/navigation'
1516
1617const defaultLayout = 'PostLayout'
1718const layouts = {
@@ -85,16 +86,7 @@ export default async function Page({ params }: { params: { slug: string[] } }) {
8586 const sortedCoreContents = allCoreContent ( sortPosts ( allBlogs ) )
8687 const postIndex = sortedCoreContents . findIndex ( ( p ) => p . slug === slug )
8788 if ( postIndex === - 1 ) {
88- return (
89- < div className = "mt-24 text-center" >
90- < PageTitle >
91- Under Construction{ ' ' }
92- < span role = "img" aria-label = "roadwork sign" >
93- 🚧
94- </ span >
95- </ PageTitle >
96- </ div >
97- )
89+ return notFound ( )
9890 }
9991
10092 const prev = sortedCoreContents [ postIndex + 1 ]
You can’t perform that action at this time.
0 commit comments