chore: updates all instances of getPayload in next to getPayloadHMR
This commit is contained in:
parent
1c30598c57
commit
61415a43fa
1961
pnpm-lock.yaml
1961
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -30,9 +30,9 @@ const Page = () => {
|
||||
<div className="codeBlock">
|
||||
<pre>
|
||||
<code>
|
||||
{`import { getPayload } from 'payload'
|
||||
{`import { getPayloadHMR } from '@payloadcms/next/utilities'
|
||||
import configPromise from '@payload-config'
|
||||
const payload = await getPayload({ config: configPromise })
|
||||
const payload = await getPayloadHMR({ config: configPromise })
|
||||
|
||||
const data = await payload.find({
|
||||
collection: 'posts',
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { getPayload } from 'payload'
|
||||
import { getPayloadHMR } from '@payloadcms/next/utilities'
|
||||
import configPromise from '@payload-config'
|
||||
|
||||
export const GET = async () => {
|
||||
const payload = await getPayload({
|
||||
const payload = await getPayloadHMR({
|
||||
config: configPromise,
|
||||
})
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import React from 'react'
|
||||
import { getPayload } from 'payload'
|
||||
import { getPayloadHMR } from '@payloadcms/next/utilities'
|
||||
import configPromise from '@payload-config'
|
||||
|
||||
const Example: React.FC = async () => {
|
||||
const payload = await getPayload({ config: configPromise })
|
||||
const payload = await getPayloadHMR({ config: configPromise })
|
||||
const url = payload.getAdminURL()
|
||||
return <div>The admin panel is running at: {url}</div>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user