chore: uncomment out the example of a server component with local api running
This commit is contained in:
@ -36,8 +36,7 @@ const Page = () => {
|
||||
contains an example of a custom route running the Local API.
|
||||
</p>
|
||||
|
||||
{/* Commented out for now due to bug */}
|
||||
{/* <Example /> */}
|
||||
<Example />
|
||||
|
||||
<p>You can use the Local API in your server components like this:</p>
|
||||
<pre>
|
||||
|
@ -4,7 +4,7 @@ import configPromise from '@payload-config'
|
||||
|
||||
const Example: React.FC = async () => {
|
||||
const payload = await getPayload({ config: configPromise })
|
||||
const url = payload.config.serverURL
|
||||
const url = payload.getAdminURL()
|
||||
return <div>The admin panel is running at: {url}</div>
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user