import { Parish } from '@/payload-types' import { Container } from '@/components/Container/Container' import { HTMLText } from '@/components/Text/HTMLText' import { Section } from '@/components/Section/Section' import { Button } from '@/components/Button/Button' import { DonationForm } from '@/components/DonationForm/DonationForm' import { YoutubePlayer } from '@/components/YoutubePlayer/YoutubePlayer' import { DonationAppeal } from '@/components/DonationAppeal/DonationAppeal' type BlocksProps = { content: Parish['content'] } export function ParishBlocks({ content }: BlocksProps) { if (!content) return null; // determine if some margin at the bottom should be added const length = content.length; const shouldAddMargin = content[length - 1].blockType === "text" return ( <>