"use client"; type AgendaItem = { order: string; time: string; title: string; description: string; avatar?: string; }; type Props = { data: { id: string; eyebrow: string; title: string; description: string; items: AgendaItem[]; }; }; const renderFormattedText = (text: string) => { if (!text) return ""; const lines = text.split("\n"); return lines.map((line, lineIndex) => { // Split the line by markdown bold (**bold**) and italic (*italic*) const parts = line.split(/(\*\*.*?\*\*|\*.*?\*)/g); const renderedLine = parts.map((part, partIndex) => { if (part.startsWith("**") && part.endsWith("**")) { return ( {part.slice(2, -2)} ); } if (part.startsWith("*") && part.endsWith("*")) { return ( {part.slice(1, -1)} ); } return part; }); return ( {renderedLine} ); }); }; export default function AgendaSection({ data }: Props) { const base = process.env.NEXT_PUBLIC_BASE_PATH || ""; const renderAvatar = (avatarUrl: string, sizeClass: string) => (
{data.description}