Clean up preview pages
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
tobias 2024-07-11 21:04:47 +02:00
parent e060d942f0
commit 9edb207991
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ import { notFound } from 'next/navigation'
const PreviewCatchAllPage = async ({ params }: { params: { path: string[] } }) => { const PreviewCatchAllPage = async ({ params }: { params: { path: string[] } }) => {
noStore() noStore()
const [user, page] = await Promise.all([ const [page] = await Promise.all([
getCurrentUser(), getCurrentUser(),
getDocument({ getDocument({
collection: COLLECTION_SLUG_PAGE, collection: COLLECTION_SLUG_PAGE,
@ -16,7 +16,7 @@ const PreviewCatchAllPage = async ({ params }: { params: { path: string[] } }) =
cache: false, cache: false,
}), }),
]) ])
/* if (!user || !page) notFound() */ if (!page) notFound()
return <PreviewBlocks initialData={page} locale="" url={process.env.BASE_URL || ''} /> return <PreviewBlocks initialData={page} locale="" url={process.env.BASE_URL || ''} />
} }

View File

@ -8,7 +8,7 @@ import PreviewPostPage from '@/components/PreviewPostPage'
const PreviewCatchAllPage = async ({ params }: { params: { path: string[] } }) => { const PreviewCatchAllPage = async ({ params }: { params: { path: string[] } }) => {
noStore() noStore()
const [user, page] = await Promise.all([ const [page] = await Promise.all([
getCurrentUser(), getCurrentUser(),
getDocument({ getDocument({
collection: COLLECTION_SLUG_POST, collection: COLLECTION_SLUG_POST,
@ -17,7 +17,7 @@ const PreviewCatchAllPage = async ({ params }: { params: { path: string[] } }) =
cache: false, cache: false,
}), }),
]) ])
/* if (!user || !page) notFound() */ if (!page) notFound()
return <PreviewPostPage initialData={page} locale="" url={process.env.BASE_URL || ''} /> return <PreviewPostPage initialData={page} locale="" url={process.env.BASE_URL || ''} />
} }