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:
@@ -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 })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user