mirror of
https://github.com/hanzo-apps/cms.git
synced 2026-10-30 14:47:33 +00:00
Originally this PR with extra changes: https://github.com/payloadcms/payload/pull/15410 - Adds ability to register custom views at the collection level via `admin.components.views[key]` with a `Component` and `path` — resolves #15386 - Folders take routing precedence over custom views when both are defined on an upload collection - Adds a startup `console.warn` when a custom view is misconfigured without a `path` property ## Usage ```ts { slug: 'products', admin: { components: { views: { grid: { Component: '/components/GridView', path: '/grid', exact: true, }, }, }, }, } --------- Co-authored-by: robinscholz <[email protected]> Co-authored-by: Robin Scholz <[email protected]> Co-authored-by: Robin Vey <[email protected]> Co-authored-by: Hanzo Dev <[email protected]>
6 lines
147 B
TypeScript
6 lines
147 B
TypeScript
import React from 'react'
|
|
|
|
export function ConflictingView() {
|
|
return <div data-testid="conflicting-custom-view">Conflicting Custom View</div>
|
|
}
|