fix(next): missing FormQueryParamsProvider in account view (#5270)
Co-authored-by: Will Viles <will@vil.es>
This commit is contained in:
@@ -3,6 +3,7 @@ import type { Data, DocumentPreferences, ServerSideEditViewProps } from 'payload
|
||||
import {
|
||||
DocumentHeader,
|
||||
DocumentInfoProvider,
|
||||
FormQueryParamsProvider,
|
||||
HydrateClientUser,
|
||||
RenderCustomComponent,
|
||||
buildStateFromSchema,
|
||||
@@ -22,6 +23,7 @@ export { generateAccountMetadata } from './meta.js'
|
||||
export const Account: React.FC<AdminViewProps> = async ({ initPageResult, searchParams }) => {
|
||||
const {
|
||||
permissions,
|
||||
locale,
|
||||
req: {
|
||||
i18n,
|
||||
payload,
|
||||
@@ -118,6 +120,14 @@ export const Account: React.FC<AdminViewProps> = async ({ initPageResult, search
|
||||
i18n={i18n}
|
||||
/>
|
||||
<HydrateClientUser permissions={permissions} user={user} />
|
||||
<FormQueryParamsProvider
|
||||
initialParams={{
|
||||
depth: 0,
|
||||
'fallback-locale': 'null',
|
||||
locale: locale.code,
|
||||
uploadEdits: undefined,
|
||||
}}
|
||||
>
|
||||
<RenderCustomComponent
|
||||
CustomComponent={
|
||||
typeof CustomAccountComponent === 'function' ? CustomAccountComponent : undefined
|
||||
@@ -125,6 +135,7 @@ export const Account: React.FC<AdminViewProps> = async ({ initPageResult, search
|
||||
DefaultComponent={EditView}
|
||||
componentProps={serverSideProps}
|
||||
/>
|
||||
</FormQueryParamsProvider>
|
||||
</DocumentInfoProvider>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user