'use client'; import React from 'react'; import Image from 'next/image'; export interface ContentSectionProps { eyebrow?: React.ReactNode; heading?: React.ReactNode; body?: React.ReactNode; imageUrl?: string; imageAlt?: string; } const ContentSection: React.FC = ({ eyebrow, heading, body, imageUrl, imageAlt, }) => { return (
{eyebrow && (

{eyebrow}

)} {heading && (

{heading}

)} {imageUrl && (
{imageAlt
)} {body && (
{typeof body === 'string' ? body .split(/\n{2,}/) .filter((paragraph) => paragraph.trim()) .map((paragraph, index) =>

{paragraph}

) : body}
)}
); }; export default ContentSection;