This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/blocks/Content/config.ts | |
| import type { Block, Field } from 'payload' | |
| import { | |
| FixedToolbarFeature, | |
| HeadingFeature, | |
| InlineToolbarFeature, | |
| lexicalEditor, | |
| TextStateFeature, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { YouTubeBlock as YouTubeBlockProps } from '@/payload-types' | |
| import React from 'react' | |
| type Props = { | |
| className?: string | |
| } & YouTubeBlockProps | |
| export const YouTubeBlock: React.FC<Props> = ({ className, videoId }) => { | |
| return ( | |
| <div className={className}> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { CollectionConfig, TextField } from 'payload' | |
| import { authenticated } from '../../access/authenticated' | |
| import { authenticatedOrPublished } from '../../access/authenticatedOrPublished' | |
| import { AmenitiesBlock } from '../../blocks/Amenities/config' | |
| import { Archive } from '../../blocks/ArchiveBlock/config' | |
| import { BrandGridBlock } from '../../blocks/BrandGrid/config' | |
| import { CallToAction } from '../../blocks/CallToAction/config' | |
| import { Content } from '../../blocks/Content/config' | |
| import { FormBlock } from '../../blocks/Form/config' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { CollectionConfig } from 'payload' | |
| export const Resources: CollectionConfig = { | |
| slug: 'resources', | |
| admin: { | |
| useAsTitle: 'title', | |
| }, | |
| access: { | |
| // Users can read public resources OR resources matching their departments | |
| read: ({ req: { user } }) => { |