File tree Expand file tree Collapse file tree 1 file changed +2
-20
lines changed
src/app/(frontend)/[locale]/posts/[slug] Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -17,31 +17,13 @@ import { LivePreviewListener } from '@/components/LivePreviewListener'
1717
1818import { getTranslations } from 'next-intl/server'
1919
20- export async function generateStaticParams ( ) {
21- const payload = await getPayload ( { config : configPromise } )
22- const posts = await payload . find ( {
23- collection : 'posts' ,
24- draft : false ,
25- limit : 1000 ,
26- overrideAccess : false ,
27- pagination : false ,
28- select : {
29- slug : true ,
30- } ,
31- } )
32-
33- const params = posts . docs . map ( ( { slug } ) => {
34- return { slug }
35- } )
36-
37- return params
38- }
39-
4020type Args = {
4121 params : Promise < {
4222 slug ?: string
4323 } >
4424}
25+ export const dynamicParams = true
26+ export const revalidate = 60
4527
4628export default async function Post ( { params : paramsPromise } : Args ) {
4729 const { isEnabled : draft } = await draftMode ( )
You can’t perform that action at this time.
0 commit comments