Skip to content

LivePreview not updating in Next.js App Router? #9688

Discussion options

You must be logged in to vote

Thanks for you response! I have the following parent controller and I did enabled drafts for the projects collection:

import { ProjectPage } from "@/app/components/ProjectPage"
import { getSEOTags } from "@/app/libs/seo"
import { Project } from "@/payload-types"
import { notFound } from "next/navigation"
import { getPayload } from 'payload'
import config from "@payload-config"
import { RefreshRouteOnSave } from "@/app/libs/RefreshRouterOnSave"

interface ProjectPageProps {
    params: Promise<{
        slug: string
    }>
}

export async function generateMetadata({ params }: ProjectPageProps) {
    const { slug } = await Promise.resolve(params)
    const payload = await getPayload({ confi…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tomvandenbogaart
Comment options

Answer selected by tomvandenbogaart
@tomvandenbogaart
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants