import { Badge } from "@/components/ui/badge";
export type ChangelogEntry = {
version: string;
date: string;
title: string;
description: string;
items?: string[];
image?: string;
};
export interface Changelog1Props {
title?: string;
description?: string;
entries?: ChangelogEntry[];
className?: string;
}
const Changelog1 = ({
title = "Changelog",
description = "Get the latest updates and improvements to our platform.",
entries = defaultChangelogData,
}: Changelog1Props) => {
return (
<section className="py-32">
<div className="container">
<div className="mx-auto max-w-3xl">
<h1 className="mb-4 text-3xl font-bold tracking-tight md:text-5xl">
{title}
</h1>
<p className="mb-6 text-base text-muted-foreground md:text-lg">
{description}
</p>
</div>
<div className="mx-auto mt-16 max-w-3xl space-y-16 md:mt-24 md:space-y-24">
{entries.map((entry, index) => (
<div
key={index}
className="relative flex flex-col gap-4 md:flex-row md:gap-16"
>
<div className="top-28 flex h-min shrink-0 items-center gap-4 md:sticky">
<Badge variant="secondary" className="text-xs">
{entry.version}
</Badge>
<span className="text-xs font-medium text-muted-foreground">
{entry.date}
</span>
</div>
<div>
<h2 className="mb-3 text-lg leading-tight font-bold text-foreground/90 md:text-2xl">
{entry.title}
</h2>
<p className="text-sm text-muted-foreground md:text-base">
{entry.description}
</p>
{entry.items && entry.items.length > 0 && (
<ul className="mt-4 ml-4 space-y-1.5 text-sm text-muted-foreground md:text-base">
{entry.items.map((item, itemIndex) => (
<li key={itemIndex} className="list-disc">
{item}
</li>
))}
</ul>
)}
{entry.image && (
<img
src={entry.image}
alt={`${entry.version} visual`}
className="mt-8 w-full rounded-lg object-cover"
/>
)}
</div>
</div>
))}
</div>
</div>
</section>
);
};
export { Changelog1 };
export const defaultChangelogData: ChangelogEntry[] = [
{
version: "Version 1.3.0",
date: "15 November 2024",
title: "Enhanced Analytics Dashboard",
description:
"We've completely redesigned our analytics dashboard to provide deeper insights and improved visualizations of your data.",
items: [
"Interactive data visualizations with real-time updates",
"Customizable dashboard widgets",
"Export analytics in multiple formats (CSV, PDF, Excel)",
"New reporting templates for common use cases",
"Improved data filtering and segmentation options",
],
image: "https://shadcnblocks.com/images/block/placeholder-aspect-video-1.svg",
},
{
version: "Version 1.2.5",
date: "7 October 2024",
title: "Mobile App Launch",
description:
"We're excited to announce the launch of our mobile application, available now on iOS and Android platforms.",
items: [
"Native mobile experience for on-the-go productivity",
"Offline mode support for working without internet connection",
"Push notifications for important updates",
"Biometric authentication for enhanced security",
],
image: "https://shadcnblocks.com/images/block/placeholder-aspect-video-1.svg",
},
{
version: "Version 1.2.1",
date: "23 September 2024",
title: "New features and improvements",
description:
"Here are the latest updates and improvements to our platform. We are always working to improve our platform and your experience.",
items: [
"Added new feature to export data",
"Improved performance and speed",
"Fixed minor bugs and issues",
"Added new feature to import data",
],
image: "https://shadcnblocks.com/images/block/placeholder-aspect-video-1.svg",
},
{
version: "Version 1.0.0",
date: "31 August 2024",
title: "First version of our platform",
description:
"Introducing a new platform to help you manage your projects and tasks. We are excited to launch our platform and help you get started. We are always working to improve our platform and your experience.",
image: "https://shadcnblocks.com/images/block/placeholder-aspect-video-1.svg",
},
];