BREAKING CHANGE: If your config has a `admin.components.routes` array, you will need to key them into the `admin.components.views` object. The configuration options should remain unchanged.
28 lines
675 B
TypeScript
28 lines
675 B
TypeScript
import React, { Fragment } from 'react'
|
|
|
|
import type { AdminViewComponent } from '../../../../../packages/payload/src/config/types'
|
|
|
|
const CustomAccountView: AdminViewComponent = () => {
|
|
return (
|
|
<Fragment>
|
|
<div
|
|
style={{
|
|
marginTop: 'calc(var(--base) * 2)',
|
|
paddingLeft: 'var(--gutter-h)',
|
|
paddingRight: 'var(--gutter-h)',
|
|
}}
|
|
>
|
|
<h1>Custom Account View</h1>
|
|
<p>This custom view was added through the Payload config:</p>
|
|
<ul>
|
|
<li>
|
|
<code>components.views.Account</code>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</Fragment>
|
|
)
|
|
}
|
|
|
|
export default CustomAccountView
|