import { ArrowUpRight } from "lucide-react"; import Image from "next/image"; import type { ReactNode } from "react"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; import { cn } from "@/lib/utils"; export type ChangelogTimelineEntry = { version: string; date: string; title: string; description: string; items?: string[]; image?: string; content?: ReactNode; button?: { url: string; text: string; }; }; export interface ChangelogTimelineProps { title?: string; description?: string; entries?: ChangelogTimelineEntry[]; className?: string; } const EMPTY_CHANGELOG_ENTRIES: ChangelogTimelineEntry[] = []; export const ChangelogTimeline = ({ title = "Changelog", description = "Get the latest updates and improvements to our platform.", entries = EMPTY_CHANGELOG_ENTRIES, className, }: ChangelogTimelineProps) => { return (

{title}

{description}

{entries.length > 0 ? (
{entries.map((entry) => (
{entry.version}

{entry.title}

{entry.description}

{entry.items && entry.items.length > 0 ? (
    {entry.items.map((item) => (
  • {item}
  • ))}
) : null} {entry.content ? (
{entry.content}
) : null} {entry.image ? (
{`${entry.version}
) : null} {entry.button ? ( ) : null}
))}
) : (

No changelog entries yet.

)}
); };