feat: connect header and footer to cms as globals
This commit is contained in:
@@ -5,9 +5,9 @@ import { RowLabelProps, useRowLabel } from '@payloadcms/ui'
|
||||
export const RowLabel: React.FC<RowLabelProps> = () => {
|
||||
const data = useRowLabel<NonNullable<Header['navItems']>[number]>()
|
||||
|
||||
const label = data?.data?.link?.label
|
||||
? `Nav item ${data.rowNumber !== undefined ? data.rowNumber + 1 : ''}: ${data?.data?.link?.label}`
|
||||
: 'Row'
|
||||
const label = data?.data?.label
|
||||
? `Nav item ${data.rowNumber !== undefined ? data.rowNumber + 1 : ''}: ${data.data.label}`
|
||||
: 'Nav item'
|
||||
|
||||
return <div>{label}</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user