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 {
|
import {
|
||||||
DocumentHeader,
|
DocumentHeader,
|
||||||
DocumentInfoProvider,
|
DocumentInfoProvider,
|
||||||
|
FormQueryParamsProvider,
|
||||||
HydrateClientUser,
|
HydrateClientUser,
|
||||||
RenderCustomComponent,
|
RenderCustomComponent,
|
||||||
buildStateFromSchema,
|
buildStateFromSchema,
|
||||||
@@ -22,6 +23,7 @@ export { generateAccountMetadata } from './meta.js'
|
|||||||
export const Account: React.FC<AdminViewProps> = async ({ initPageResult, searchParams }) => {
|
export const Account: React.FC<AdminViewProps> = async ({ initPageResult, searchParams }) => {
|
||||||
const {
|
const {
|
||||||
permissions,
|
permissions,
|
||||||
|
locale,
|
||||||
req: {
|
req: {
|
||||||
i18n,
|
i18n,
|
||||||
payload,
|
payload,
|
||||||
@@ -118,6 +120,14 @@ export const Account: React.FC<AdminViewProps> = async ({ initPageResult, search
|
|||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
/>
|
/>
|
||||||
<HydrateClientUser permissions={permissions} user={user} />
|
<HydrateClientUser permissions={permissions} user={user} />
|
||||||
|
<FormQueryParamsProvider
|
||||||
|
initialParams={{
|
||||||
|
depth: 0,
|
||||||
|
'fallback-locale': 'null',
|
||||||
|
locale: locale.code,
|
||||||
|
uploadEdits: undefined,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<RenderCustomComponent
|
<RenderCustomComponent
|
||||||
CustomComponent={
|
CustomComponent={
|
||||||
typeof CustomAccountComponent === 'function' ? CustomAccountComponent : undefined
|
typeof CustomAccountComponent === 'function' ? CustomAccountComponent : undefined
|
||||||
@@ -125,6 +135,7 @@ export const Account: React.FC<AdminViewProps> = async ({ initPageResult, search
|
|||||||
DefaultComponent={EditView}
|
DefaultComponent={EditView}
|
||||||
componentProps={serverSideProps}
|
componentProps={serverSideProps}
|
||||||
/>
|
/>
|
||||||
|
</FormQueryParamsProvider>
|
||||||
</DocumentInfoProvider>
|
</DocumentInfoProvider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user