Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
Using a function to set the tab label on a custom document view throws this error:
⨯ Error: Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.
{label: function label, href: ...}
^^^^^^^^^^^^^^
at stringify (<anonymous>)
at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
Link to reproduction
No response
Environment Info
Describe the Bug
Using a function to set the tab label on a custom document view throws this error:
Reproduction Steps
Adapters and Plugins
No response