This commit is contained in:
parent
e060d942f0
commit
9edb207991
@ -7,7 +7,7 @@ import { notFound } from 'next/navigation'
|
||||
|
||||
const PreviewCatchAllPage = async ({ params }: { params: { path: string[] } }) => {
|
||||
noStore()
|
||||
const [user, page] = await Promise.all([
|
||||
const [page] = await Promise.all([
|
||||
getCurrentUser(),
|
||||
getDocument({
|
||||
collection: COLLECTION_SLUG_PAGE,
|
||||
@ -16,7 +16,7 @@ const PreviewCatchAllPage = async ({ params }: { params: { path: string[] } }) =
|
||||
cache: false,
|
||||
}),
|
||||
])
|
||||
/* if (!user || !page) notFound() */
|
||||
if (!page) notFound()
|
||||
return <PreviewBlocks initialData={page} locale="" url={process.env.BASE_URL || ''} />
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ import PreviewPostPage from '@/components/PreviewPostPage'
|
||||
|
||||
const PreviewCatchAllPage = async ({ params }: { params: { path: string[] } }) => {
|
||||
noStore()
|
||||
const [user, page] = await Promise.all([
|
||||
const [page] = await Promise.all([
|
||||
getCurrentUser(),
|
||||
getDocument({
|
||||
collection: COLLECTION_SLUG_POST,
|
||||
@ -17,7 +17,7 @@ const PreviewCatchAllPage = async ({ params }: { params: { path: string[] } }) =
|
||||
cache: false,
|
||||
}),
|
||||
])
|
||||
/* if (!user || !page) notFound() */
|
||||
if (!page) notFound()
|
||||
|
||||
return <PreviewPostPage initialData={page} locale="" url={process.env.BASE_URL || ''} />
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user