fix(examples): awaits getHeaders in auth example (#10100)

The auth example was not properly awaiting `getHeaders` from
`next/navigation`. This was simply outdated, as this function was
changed to async over the course of the various RC versions during our
beta phase.
This commit is contained in:
Jacob Fletcher
2024-12-20 10:38:38 -05:00
committed by GitHub
parent 59fc9d094e
commit 7bedd6d822
9 changed files with 9 additions and 8 deletions

View File

@@ -44,7 +44,7 @@ See the [Collections](https://payloadcms.com/docs/configuration/collections) doc
import config from '../../payload.config'
export default async function AccountPage({ searchParams }) {
const headers = getHeaders()
const headers = await getHeaders()
const payload = await getPayload({ config: configPromise })
const { permissions, user } = await payload.auth({ headers })